JMH and ocperf
Sergey Melnikov
melnikov.sergey.v at gmail.com
Tue Dec 6 22:25:41 UTC 2016
Hi,
As far as I see, there are two possible options:
- Add workaround to JMH for matching event names with underscores instead of dots.
- Fix ocperf.py for getting correct event names.
I think, the 'right' solution here is to fix ocperf.py (I'll ask owner (Andi) if he willing to improve current status, but it's not really fast process).
I believe we definitely shouldn't add a workaround in JMH for matching event names with underscores instead of dots (I hope, we won't get tons of questions here about why JMH doesn't work with ocperf.py).
For now, I believe we should add to JMH release notes about JMH_PERF variable (how it works) and how to use it with ocperf.py. Also, we should add to JMH release notes *BIG* disclaimer with examples about event names.
--Sergey
On Tue, Dec 06, 2016 at 12:39:43PM +0100, Aleksey Shipilev wrote:
> On 12/05/2016 10:42 PM, Sergey Melnikov wrote:
> > As I wrote, the main issue here is an event naming style. Few details:
> >
> > ocperf.py takes events with dots ('.') in titles but outputs events with underscores ('_') instead of dots.
> > So, you need to replace dots ('.') with underscores ('_') and you will get results for specified events:
> >
> > -prof perfasm:event=cycles,br_inst_exec_all_branches
> >
> > The reason for this a bit behaviour is backward compatibility with old versions of perf.
>
> Right.
>
> -prof perfasm:event=cycles,br_inst_exec_all_branches works for me.
>
> I am undecided if we should try to match the event names with underscores too,
> on the off-chance we run with ocperf.py. Or we maybe we should wait for
> ocperf.py to drop that in future?
>
> Thanks,
> -Aleksey
>
More information about the jmh-dev
mailing list