RFR(xs): 8150619: Improve thread based logging introduced with 8149036
thomas.stuefe at gmail.com
Fri Feb 26 14:30:00 UTC 2016
thank you for looking at this!
I designed the test carefully. We have loads of tests which parse our VM
output, so I know the problems you describe...
But just to be sure I modified the test (in-place, no new webrev) and
reduced the number of patterns I look for to only those which occur
multiple times during a "java -version". I ran the test on Linux, AIX, Mac
and Windows 8. I am reasonably sure it will work and be stable enough.
Kind Regards, Thomas
On Fri, Feb 26, 2016 at 1:15 PM, Coleen Phillimore <
coleen.phillimore at oracle.com> wrote:
> Hi I think David should sponsor this once he's happy all the nits are out.
> Thank you for adding the test. Does this output come out for every
> platform? Sometimes there's a race with threads exiting and not getting
> the 'exiting' log messages. We've had trouble with reliability of the
> tests we've added and have had to dial back the messages we look for. Do
> you have windows systems to run this on?
> On 2/25/16 8:19 AM, Thomas Stüfe wrote:
>> 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
>> Original mail thread for 8149036:
>> The change unifies the logging messages for all platforms and all log
>> 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",
>> 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
>> Thanks & Kind Regards, Thomas
More information about the hotspot-runtime-dev