Request for review 7170638: Use DTRACE_PROBE[N] in JNI Set and SetStatic Field.
Keith McGuigan
keith.mcguigan at oracle.com
Wed Oct 3 04:53:52 PDT 2012
Yes, it would certainly be nice to have some functional tests for this, if possible, but the code looks good to me if you need a reviewer.
--
- Keith
On Oct 2, 2012, at 9:32 PM, Coleen Phillmore wrote:
>
> I have changed the dtrace.make makefile a bit. The JVM group at Oracle hasn't added support for SystemTap so I wanted to make sure that Oracle doesn't support this in the binaries and mistakenly enable this if we upgrade our build compilers or systems. The dtrace probe support is now also guarded by an ifdef OPENJDK. Do you build with OPENJDK=true when you build just hotspot binaries? The JDK sets this variable in the Makefiles.
>
> Please review and try the patch in this webrev.
>
> http://cr.openjdk.java.net/~coleenp/7170638_3/ <http://cr.openjdk.java.net/%7Ecoleenp/7170638_3/>
>
> Also is it possible for the test to do more than just test that the probes are enabled? Or does it require some external tools?
>
> Thanks,
> Coleen
>
> On 10/2/2012 4:52 AM, Mark Wielaard wrote:
>> On Mon, Oct 01, 2012 at 08:19:20PM -0400, Karen Kinnear wrote:
>>> 1. If you build with an earlier version of gcc - e.g. 4.3 -
>>> what happens when you build?
>> Building with older gcc is fine as long as you don't enable/install
>> sys/sdt.h. If you do enable it, but don't have a new enough GCC you might
>> get a build failure.
>>
>>> And when you run?
>> If it builds it runs, there are no runtime dependencies. See below.
>>
>>> - i.e. shouldn't the makefile conditional be on both the existence
>>> of sys/std.h and the gcc version?
>> As explained in the original submission for IcedTea I have a configure
>> feature check so you don't have to depend on specific versions, but
>> the hotspot build seems to prefer setting variables for things you want.
>> So I followed that convention in the make file patch.
>> http://mail.openjdk.java.net/pipermail/hotspot-dev/2012-July/006196.html
>> But a version check can be added. Does the attached patch work for you?
>> I put in 4.4 as minimum since that is the oldest GCC that I have installed
>> that seems to compile things fine.
>>
>>> 2. If you build on gcc 4.5 with a system that has std.h - what happens
>>> if you run on a system that does not have a version of SystemTap that
>>> supports dtrace->std?
>>> Do you need a runtime check as well so there are not problems in the field?
>> You don't need any runtime checks since there are no runtime dependencies.
>> gdb or stap might take advantage of the markers if they are there, but they
>> are just like debuginfo. If it is there you can take advantage of it with
>> the right tools to trace/debug hotspot, otherwise it doesn't have any impact.
>>
>> See also the explanation I gave here:
>> http://mail.openjdk.java.net/pipermail/hotspot-dev/2012-May/005846.html
>>
>> Cheers,
>>
>> Mark
More information about the hotspot-dev
mailing list