[PATCH] 8217561 : X86: Add floating-point Math.min/max intrinsics, approval request

Vladimir Kozlov vladimir.kozlov at oracle.com
Tue Feb 26 21:34:37 UTC 2019

On 2/26/19 1:14 PM, B. Blaser wrote:
> Hi Vladimir,
> On Tue, 26 Feb 2019 at 21:50, Vladimir Kozlov
> <vladimir.kozlov at oracle.com> wrote:
>> Hi Bernard,
>> Unfortunately HotSpot does not collect profiling information per call site.
>> Currently calee's data is collected from all call sites. For example, you can have 2 calls with same *swapped* arguments
>> and you will get your balance == 0.
>> I would assume if you have multiply call sites in application the profiling data will be "flat" - balance value will be
>> near 0.
>> We did experiment few years ago to collect data per call site but we got negative result - no significant improvement in
>> code quality in cost of a lot more memory used for MethodData.
>> But your case (and cmove) is special since MDO is small for these methods. The only downside is to implement that you
>> will need a lot more complex changes in HotSpot.
>> https://bugs.openjdk.java.net/browse/JDK-8015416
>> Note, your code is correct in a sense that it use the same profiling data as it currently used for inlining these
>> methods. So I don't want to reject changes from the start.
>> The only simple solution I can think of is to use intrinsic only for hottest call site. Compare invocation_count with
>> caller's call site count to find if it is most used site which contributed the most profiling data.
>> Thanks,
>> Vladimir
> Thanks for your feedback.
> I pushed webrev.05 to jdk/submit a while ago but once I have the
> results I'll update the patch as you suggested; the heuristic will
> bail out if the caller didn't contribute enough to the statistics, let
> say something like at least 80%?

Yes, this sounds good.


> Bernard

More information about the hotspot-compiler-dev mailing list