Skip to main content

Howto get statistic about Locks?

5 replies [Last post]
linuxhippy
Offline
Joined: 2004-01-07
Points: 0

Hi there,

I know the Mustang-debug-build has one of those favourite -XX+Print options for lock-statistics, however I've read it once and now I can't remember anymore :-(

Does anybody know the parameter name for to enable printing lock statistic?

Thanks in advance, lg Clemens

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
linuxhippy
Offline
Joined: 2004-01-07
Points: 0

> Use the following flags with the latest debug
> binary:
> -XX:+PrintLockStatistics
> -XX:+PrintEliminateLocks

Exactly that were the options I was referring too, thanks a lot!

The log file is very interresting, however not verbose enough to do program optimizations.

Thanks again, lg Clemens

Message was edited by: linuxhippy

kschneid
Offline
Joined: 2003-06-10
Points: 0

Well, I think there's [i]-XX:+PrintConcurrentLocks[/i] for including java.util.concurrent locks in a thread dump. I believe [i]jstack -l[/i] does the equivalent. Is that what you were looking for? See:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5086475
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6266583

Kris

linuxhippy
Offline
Joined: 2004-01-07
Points: 0

Not, really.

I was expecting information which looks like something equal to that:
monitor StringBuffer:append:2 - changed to SpinLock
monitor AWTEvenet...... - changed to SleepLock
monitor .... - is uncontended fast-path

such output would be really great and also would help to identify scaliability bottlenecks.

lg Clemens

eileeny
Offline
Joined: 2005-07-13
Points: 0

Use the following flags with the latest debug binary:
-XX:+PrintLockStatistics
-XX:+PrintEliminateLocks

HTH,
Eileen

kschneid
Offline
Joined: 2003-06-10
Points: 0

> -XX:+PrintLockStatistics
> -XX:+PrintEliminateLocks

Ah, missed those. They're specific to the server JVM, right?

Kris