7187999: dtrace jstack action is broken
authorsspitsyn
Fri, 01 Aug 2014 16:33:46 -0700
changeset 25897 f0998f922461
parent 25896 5f21a029fdeb
child 25898 a1c97825878e
7187999: dtrace jstack action is broken Summary: Separate jhelper.d and hotspot provider (other USDT probes) Reviewed-by: dholmes, dsamersoff Contributed-by: serguei.spitsyn@oracle.com
hotspot/make/solaris/makefiles/dtrace.make
--- a/hotspot/make/solaris/makefiles/dtrace.make	Thu Jul 31 11:56:59 2014 -0700
+++ b/hotspot/make/solaris/makefiles/dtrace.make	Fri Aug 01 16:33:46 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -58,6 +58,8 @@
 DTRACE_COMMON_SRCDIR = $(GAMMADIR)/src/os/posix/dtrace
 DTRACE = dtrace
 DTRACE.o = $(DTRACE).o
+DTRACE_JHELPER = dtrace_jhelper
+DTRACE_JHELPER.o = $(DTRACE_JHELPER).o
 
 # to remove '-g' option which causes link problems
 # also '-z nodefs' is used as workaround
@@ -255,7 +257,10 @@
 endif
 
 $(DTRACE).d: $(DTRACE_COMMON_SRCDIR)/hotspot.d $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d \
-             $(DTRACE_COMMON_SRCDIR)/hs_private.d $(DTRACE_SRCDIR)/jhelper.d
+             $(DTRACE_COMMON_SRCDIR)/hs_private.d
+	$(QUIETLY) cat $^ > $@
+
+$(DTRACE_JHELPER).d: $(DTRACE_SRCDIR)/jhelper.d
 	$(QUIETLY) cat $^ > $@
 
 DTraced_Files = ciEnv.o \
@@ -280,7 +285,7 @@
                 vmGCOperations.o \
 
 # Dtrace is available, so we build $(DTRACE.o)  
-$(DTRACE.o): $(DTRACE).d $(JVMOFFS).h $(JVMOFFS)Index.h $(DTraced_Files)
+$(DTRACE.o): $(DTRACE).d $(DTraced_Files)
 	@echo Compiling $(DTRACE).d
 
 	$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -G -xlazyload -o $@ -s $(DTRACE).d \
@@ -344,6 +349,11 @@
 
 dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h
 
+# The jhelper.d and hotspot probes are separated into two different SUNW_dof sections.
+# Now the jhelper.d is built without the -Xlazyload flag.
+$(DTRACE_JHELPER.o) : $(DTRACE_JHELPER).d $(JVMOFFS).h $(JVMOFFS)Index.h
+	@echo Compiling $(DTRACE_JHELPER).d
+	$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -G -o $@ -s $(DTRACE_JHELPER).d
 
 .PHONY: dtraceCheck
 
@@ -372,7 +382,7 @@
 ifneq ("${DTRACE_PROG}", "")
 ifeq ("${HOTSPOT_DISABLE_DTRACE_PROBES}", "")
 
-DTRACE_OBJS = $(DTRACE.o) $(JVMOFFS.o)
+DTRACE_OBJS = $(DTRACE.o) $(JVMOFFS.o) $(DTRACE_JHELPER.o)
 CFLAGS += $(DTRACE_INCL) -DDTRACE_ENABLED
 MAPFILE_DTRACE_OPT = $(MAPFILE_DTRACE)