Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to detect hot locks !

1 view
Skip to first unread message

Neo

unread,
Sep 23, 2008, 11:14:32 AM9/23/08
to
Hi Guys,
Is there any way or tool exists which tells "hot" critical sections
in your code?

- Vikram S

Neo

unread,
Sep 23, 2008, 11:23:54 AM9/23/08
to

Just to add to this. I am using a third party library where I suspect
of having this kind of bottle neck.

Alex Blekhman

unread,
Sep 24, 2008, 4:28:42 AM9/24/08
to
"Neo" wrote:
> Is there any way or tool exists which tells "hot" critical
> sections in your code?


Yes, you can observe contention count of critical section objects.
See this article for more details:

"Break Free of Code Deadlocks in Critical Sections Under Windows"
http://msdn.microsoft.com/en-us/magazine/cc164040.aspx

Also, this article demonstrates debugging technique how to locate
"hot spots". The article is about .NET application, but they use
WinDbg to debug native threads.

"Debugging Contention Problems"
http://msdn.microsoft.com/en-us/library/ms954592.aspx

HTH
Alex


Duane Hebert

unread,
Sep 24, 2008, 9:13:01 AM9/24/08
to
"Neo" <vikram...@gmail.com> wrote in message
news:b0b56c53-9e95-4418...@k36g2000pri.googlegroups.com...

> Hi Guys,
> Is there any way or tool exists which tells "hot" critical sections
> in your code?

We use Memory Validator for leak detection and it has
some profiling that shows hot spots as well.

http://memoryvalidator.com/productsCpp.html

They have some other profilers etc. Good support and
decent price.

0 new messages