On 02/27/2015 01:37 PM, Markus Gronlund wrote:
Are you saying that ciMethod does not always have a Method* to be referenced?
right. e.g. one of ciMethod ctor[1] set _method_data (used as Method* in
get_method[2]) to null.
[1]
http://hg.openjdk.java.net/jdk9/hs/hotspot/file/6357f6686ca2/src/share/vm/ci/ciMethod.cpp#l172
[2]
http://hg.openjdk.java.net/jdk9/hs/hotspot/file/6357f6686ca2/src/share/vm/ci/ciMethod.hpp#l98
In that case, my suggested approach will be problematic. Adding intrinsics are
not trivial - we could probably take this outside this thread.
If you cannot use Method*, then your struct approach is understandable.
/Markus
-----Original Message-----
From: Igor Ignatyev
Sent: den 27 februari 2015 11:30
To: Markus Gronlund
Cc: [email protected] compiler;
[email protected]
Subject: Re: RFR (S) : 8073607 : add trace events for inlining
Hi Markus,
thank you for your review.
we can't use Method instead of ciMethod since there are some cases then we have ciMethod
but can't get Method from it, e.g. unresolved class. I think it makes sense to implement
"intrinsics" for ciMethod/ciClass, can you advise me how to do that?
Thanks,
Igor
On 02/27/2015 01:25 PM, Markus Gronlund wrote:
Hi Igor,
In trace.xml:
<struct id="CiMethod">
404 <value type="UTF8" field="class" label="Class name"/>
405 <value type="UTF8" field="method" label="Method name"/>
406 <value type="UTF8" field="signature" label="Method signature"/>
407 </struct>
You don't need to write an individual UTF8 string for every class, method and desc as we
have "intrinsics" for taking care of this for you.
This also means you wouldn't need to create a separate struct, as you can just
define the necessary fields as type METHOD in the CompilerInlining event:
<event id="CompilerInlining" path="vm/compiler/opto/inlining" label="Compiler
Optimization :: Inlining"
410 has_thread="true" is_instant="true">
411 <value type="UINT" field="compileID" label="Compilation ID"
relation="COMP_ID"/>
412 <value type="METHOD" field="caller" label="Caller "/>
413 <value type="METHOD" field="callee" label="Callee "/>
414 <value type="BOOLEAN" field="succeeded" label="Succeeded"/>
415 <value type="UTF8" field="message" label="Message"/>
416 <value type="INTEGER" field="bci" label="bci"/>
417 </event>
// I also removed these attributes " is_requestable="false" is_constant="false" - they
are defaults. I changed to "is_instant=true" since it looks like the event does not span over a duration
in bytecodeInfo.cpp.
At the event site, you will now need to pass the Hotspot Method* as the values
(unsure how you pull that out of a ci* artifact, but you have the Metadata* for
the Method there somewhere):
result.set_caller(Method* caller_method);
result.set_callee(Method* callee_method);
Thanks
Markus
-----Original Message-----
From: Igor Ignatyev
Sent: den 24 februari 2015 22:11
To: [email protected] compiler;
[email protected]
Subject: RFR (S) : 8073607 : add trace events for inlining
Hi guys,
could you please review the patch which adds trace events for inlining for
c1/c2 compiler?
An added event provides information about caller, callee, bci, inline status
and message.
webrev : http://cr.openjdk.java.net/~iignatyev/8073607/webrev.00/
JBS: https://bugs.openjdk.java.net/browse/JDK-8073607
--
Igor