Printing profiling data from all threads(as opposed to just main-thread)
------------------------------------------------------------------------
Key: JRUBY-5862
URL: http://jira.codehaus.org/browse/JRUBY-5862
Project: JRuby
Issue Type: Improvement
Components: Performance
Environment: Environment agnostic
Reporter: Janmejay Singh
Attachments:
0001-print-the-profile-with-all-threads-added-up-not-just.patch,
0002-Capture-profiling-data-for-threads-that-are-reaped-s.patch
The --profile option collects the Invocation data and prints it to stderr
during teardown. This invocation data is only printed out for main thread and
not all threads. In cases where JRuby is being used on a web-container in "one
runtime - multiple threads" mode, it makes sense to print all threads(as
requests come in on different threads). These patches aggregate data for
multiple threads and optionally(on flip of a system-property) also keep the
invocation data for garbage-collected threads. All of this data is printed to
stderr in place of just mainThread data. Since main thread is a part of
threadService map too, thats captured as well. So its backward compatible.
Have manually verified it works, but haven't yet added tests for the same. Will
add tests in a separate patch and attach it to this issue soon. Have verified
all existing tests pass with these changes.
Git patches are attached.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email