[ https://issues.apache.org/jira/browse/LUCENE-10099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Robert Miller updated LUCENE-10099: ---------------------------------------- Description: Allow async profiler in addition to the JFR profiler. async profiler description: {noformat} This project is a low overhead sampling profiler for Java that does not suffer from Safepoint bias problem. It features HotSpot-specific APIs to collect stack traces and to track memory allocations. The profiler works with OpenJDK, Oracle JDK and other Java runtimes based on the HotSpot JVM. async-profiler can trace the following kinds of events: * CPU cycles * Hardware and Software performance counters like cache misses, branch misses, page faults, context switches etc. * Allocations in Java Heap * Contented lock attempts, including both Java object monitors and ReentrantLocks {noformat} The "tests.asyncprofile" mode switch turns on the async profiler ([https://github.com/jvm-profiling-tools/async-profiler]) during test execution, and prints a simple summary at the end. For example, top-10 histogram of methods (cpu samples): {noformat} gradlew -p lucene/core test -Ptests.asyncprofile=true{noformat} Alternatively, you can profile heap allocations instead: TBD *Requirements* * You need to download async profiler 2.x ([https://github.com/jvm-profiling-tools/async-profiler]) * You need the .so lib in a standard shared folder or one of the directories from LD_LIBRARY_PATH (Linux, though not Arch by default), DYLD_LIBRARY_PATH (Mac OS), or -Djava.library.path. I think ${HOME}/libs also works on Linux. We could also allow specifying the location directly as an option. * Debug version of Java is important for best results and is required for heap allocation profiling. Available as package on Ubuntu, can be built with a small modification on Arch. The following permissions need to be set to allow for the proper permissions for profiling: {noformat} # sysctl kernel.perf_event_paranoid=1 # sysctl kernel.kptr_restrict=0{noformat} was: Allow async profiler in addition to the JFR profiler. async profiler description: {noformat} This project is a low overhead sampling profiler for Java that does not suffer from Safepoint bias problem. It features HotSpot-specific APIs to collect stack traces and to track memory allocations. The profiler works with OpenJDK, Oracle JDK and other Java runtimes based on the HotSpot JVM. async-profiler can trace the following kinds of events: CPU cycles Hardware and Software performance counters like cache misses, branch misses, page faults, context switches etc. Allocations in Java Heap Contented lock attempts, including both Java object monitors and ReentrantLocks {noformat} The "tests.asyncprofile" mode switch turns on the async profiler ([https://github.com/jvm-profiling-tools/async-profiler]) during test execution, and prints a simple summary at the end. For example, top-10 histogram of methods (cpu samples): {noformat} gradlew -p lucene/core test -Ptests.asyncprofile=true{noformat} Alternatively, you can profile heap allocations instead: TBD Requirements: You need to download async profiler 2.x ([https://github.com/jvm-profiling-tools/async-profiler]), and you need the .so lib in a standard shared folder or one of the directories from LD_LIBRARY_PATH (Linux, though not Arch by default), DYLD_LIBRARY_PATH (Mac OS), or -Djava.library.path. I think ${HOME}/libs also works on Linux. We could also allow specifying the location directly as an option. Debug version of Java is important for best results and is required for heap allocation profiling. The following permissions need to be set to allow for the proper permissions for profiling: {noformat} # sysctl kernel.perf_event_paranoid=1 # sysctl kernel.kptr_restrict=0{noformat} > Add -Ptests.asyncprofile option. > -------------------------------- > > Key: LUCENE-10099 > URL: https://issues.apache.org/jira/browse/LUCENE-10099 > Project: Lucene - Core > Issue Type: Test > Components: modules/test-framework > Reporter: Mark Robert Miller > Assignee: Mark Robert Miller > Priority: Minor > Time Spent: 40m > Remaining Estimate: 0h > > Allow async profiler in addition to the JFR profiler. > async profiler description: > {noformat} > This project is a low overhead sampling profiler for Java that does not > suffer from Safepoint bias problem. It features HotSpot-specific APIs to > collect stack traces and to track memory allocations. The profiler works with > OpenJDK, Oracle JDK and other Java runtimes based on the HotSpot JVM. > async-profiler can trace the following kinds of events: > * CPU cycles > * Hardware and Software performance counters like cache misses, branch > misses, page faults, context switches etc. > * Allocations in Java Heap > * Contented lock attempts, including both Java object monitors and > ReentrantLocks > {noformat} > > The "tests.asyncprofile" mode switch turns on the async profiler > ([https://github.com/jvm-profiling-tools/async-profiler]) during test > execution, > and prints a simple summary at the end. > For example, top-10 histogram of methods (cpu samples): > {noformat} > gradlew -p lucene/core test -Ptests.asyncprofile=true{noformat} > Alternatively, you can profile heap allocations instead: TBD > *Requirements* > * You need to download async profiler 2.x > ([https://github.com/jvm-profiling-tools/async-profiler]) > * You need the .so lib in a standard shared folder or one of the directories > from LD_LIBRARY_PATH (Linux, though not Arch by > default), DYLD_LIBRARY_PATH (Mac OS), or -Djava.library.path. I think > ${HOME}/libs also works > on Linux. We could also allow specifying the location directly as an option. > * Debug version of Java is important for best results and is required for > heap allocation profiling. Available as package on Ubuntu, can be built with > a small modification on Arch. > The following permissions need to be set to allow for the proper permissions > for profiling: > {noformat} > # sysctl kernel.perf_event_paranoid=1 > # sysctl kernel.kptr_restrict=0{noformat} > -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org