From eric.caspole at oracle.com Wed Aug 22 20:49:58 2018 From: eric.caspole at oracle.com (Eric Caspole) Date: Wed, 22 Aug 2018 16:49:58 -0400 Subject: [Patch] Pass counter values to -prof perf Message-ID: <07b69cdf-b810-ce11-8eff-d485c999487b@oracle.com> Hi everybody, I have a use case with JMH on new hardware where I need to pass the counters I want to see to -prof perf, I would like to contribute a patch for this below: ?http://cr.openjdk.java.net/~ecaspole/jmh_stat_counters/webrev/ It works like -prof perfasm extended syntax like ?-prof 'perf:events=cycles,instructions,r99' Works for me so far in my own case here. Thanks, Eric From eric.caspole at oracle.com Thu Aug 23 15:05:33 2018 From: eric.caspole at oracle.com (Eric Caspole) Date: Thu, 23 Aug 2018 11:05:33 -0400 Subject: [Patch] Pass counter values to -prof perf In-Reply-To: <1157394074.1674189.1535010322225@mail.yahoo.com> References: <07b69cdf-b810-ce11-8eff-d485c999487b@oracle.com> <1157394074.1674189.1535010322225@mail.yahoo.com> Message-ID: <141c2571-767e-8c47-0145-3c18547557f0@oracle.com> Hi Nitsan, My patch here is to put the same functionality with "-prof perf" which shows the "perf stat" data; as you say, custom events already works with "-prof perfasm" Regards, Eric On 08/23/2018 03:45 AM, Nitsan Wakart wrote: > Hi Eric, > AFAICT, the perfasm profiler has supported events for a while now. > "-prof perfasm:h" prints out the help: > ??? events=?????????????????? Events to gather. (default: > [cycles, instructions]) > > Use for instance with some random events "-prof > perfasm:events=cycles,LLC-load-misses,cache-misses" > ... > Perf output processed (skipped 8.662 seconds): > ?Column 1: cycles (49249 events) > ?Column 2: LLC-load-misses (1222 events) > ?Column 3: cache-misses (4831 events) > > ... > > So not so sure what is added here. > Thanks, > Nitsan > > > On Wednesday, August 22, 2018, 10:50:44 PM GMT+2, Eric Caspole > wrote: > > > Hi everybody, > > I have a use case with JMH on new hardware where I need to pass the > counters I want to see to -prof perf, I would like to contribute a patch > for this below: > > http://cr.openjdk.java.net/~ecaspole/jmh_stat_counters/webrev/ > > > It works like -prof perfasm extended syntax like > > ?-prof 'perf:events=cycles,instructions,r99' > > Works for me so far in my own case here. > > Thanks, > > Eric >