Proposal for two new samples

Aleksey Shipilev aleksey.shipilev at oracle.com
Tue Aug 11 07:04:39 UTC 2015


Hi Michael,

OpenJDK Terms of Use mandate you send the patch/files your are about to
contribute to OpenJDK lists (or any other OpenJDK-affiliated location).
So, you can send the patches along here.

Thanks,
-Aleksey

On 08/11/2015 02:01 AM, Michael Mirwaldt wrote:
> Hi Aleksey,
> thank you for your reply.
> 
> Sorry that contributing my code takes so long.
> 
> I have read http://openjdk.java.net/contribute/ and checked out the
> project and build it locally.
> How can I submit my code? Do I just commit it or do I need a new branch?
> 
> I have not run a "big" test yet because I miss a linux machine at home
> where I can use "perf".
> I will have one very soon.
> 
> Best regards,
> Michael
> 
> Am 27.07.2015 um 23:52 schrieb Aleksey Shipilev:
>> Hi Michael,
>>
>> On 07/28/2015 12:22 AM, Michael Mirwaldt wrote:
>>> I would like to add two samples I miss in the jmh repository.
>>> They could help jmh users to experience the effect and demonstrate that
>>> on their lectures.
>>>
>>> 1) Branch prediction
>>> - it demonstrates how branch prediction/misprediction can lead to
>>> better/worse performance.
>> Yes, that one is sure missing. This touches on benchmarking methodology
>> that tells you might need to feed the benchmark with the data arranged
>> in a way you have it in a real world. Therefore, it is a good addendum
>> to JMH Samples.
>>
>>
>>> - I could not check whether the branch misses ratio increases.
>>> If you are interested I will do so and should observe that with the
>>> command line tool perf on a linux machine.
>> It would make sense to employ -prof perfnorm or -prof perfasm in the
>> explanation for the effect.
>>
>>
>>> 2) Matrix copy
>> The cache behavior example is interesting, but I wonder if we can
>> somehow construct an example where an innocuously looking *methodology*
>> omission backfires a lot. Walking the matrix in one way or the other
>> seems to be a code-under-test implementation issue, not the methodology
>> quirk?
>>
>> For example, could the similar cache unfriendliness be demonstrated on
>> comparing iteration through HashMap and TreeMap with the same number of
>> elements (under the misguided assumption both have the same memory
>> footprint)?
>>
>>> Are the results 'significant in numbers' for you?
>> Yes, they are.
>>
>>> How can I submit my sample code so that you can try it out/review them?
>> Sure. The contributions to JMH are governed by the same rules as
>> OpenJDK. I see you have the OCA signed and submitted, so we are in
>> clear. Show us your code!
>>
>> Thanks,
>> -Aleksey
>>
> 




More information about the jmh-dev mailing list