RFR(xs): 8150619: Improve thread based logging introduced with 8149036

Thomas Stüfe thomas.stuefe at gmail.com
Thu Feb 25 13:19:52 UTC 2016


Hi all,

please review and sponsor this tiny addition to 8149036. These are some
tiny cleanups which could not be added to the original change anymore
because it was already pushed.

bug: https://bugs.openjdk.java.net/browse/JDK-8150619
webrev:
http://cr.openjdk.java.net/~stuefe/webrevs/8150619-addon-to-thread-logging/webrev.00/webrev/index.html

Original mail thread for 8149036:
http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2016-February/018099.html

The change unifies the logging messages for all platforms and all log sites
as much as possible.

Please note: "tid" always refers to whatever os::current_thread_id()
returns. This may be a pthread_t (AIX, BSD), a kernel thread id or similar
(Mac, Linux, Solaris), or a windows thread id. Beside printing the "tid", I
print out additional thread ids where it may be interesting, especially at
thread start and attach. On AIX, I print the kernel thread id, on
Linux/Mac, the pthread id.

There are some instances where I have only one and not the other:
- after a call to pthread_create(), I only have the pthread id of the
newborn thread, not the kernel thread id, so this is all I can print.
- in shared code, all I have or all I can print without making the code to
complicated is the "tid"

Finally, the change adds a jtreg test to logging, to test the new logging
switches.

Thanks & Kind Regards, Thomas


More information about the hotspot-runtime-dev mailing list