updated to systemtap 3
This commit is contained in:
parent
57c769a539
commit
e8a1ee2643
1
.gitignore
vendored
1
.gitignore
vendored
@ -61,5 +61,6 @@
|
||||
/aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u92-b14.tar.xz
|
||||
/aarch64-port-jdk8u-aarch64-jdk8u101-b14.tar.xz
|
||||
/aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u101-b14-shenandoah-merge-2016-07-25.tar.xz
|
||||
/systemtap-tapset-3.1.0.tar.xz
|
||||
/aarch64-port-jdk8u-aarch64-jdk8u102-b14.tar.xz
|
||||
/aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u102-b14.tar.xz
|
||||
|
@ -1,136 +0,0 @@
|
||||
diff -r 6e357a1fc157 tapset/hotspot.stp.in
|
||||
--- tapset/hotspot-1.8.0.stp.in Tue Apr 26 18:36:01 2016 +0100
|
||||
+++ tapset/hotspot-1.8.0.stp.in Wed Jul 13 14:06:31 2016 -0400
|
||||
@@ -141,7 +141,8 @@
|
||||
Triggers at the end of the virtual machine initialization.
|
||||
Has no arguments.
|
||||
*/
|
||||
-probe hotspot.vm_init_end =
|
||||
+probe hotspot_vm_init_end = hotspot.vm_init_end8 {}
|
||||
+probe hotspot.vm_init_end8 =
|
||||
process("@ABS_CLIENT_LIBJVM_SO@").mark("vm__init__end"),
|
||||
process("@ABS_SERVER_LIBJVM_SO@").mark("vm__init__end")
|
||||
{
|
||||
diff -r 6e357a1fc157 tapset/jstack.stp.in
|
||||
--- tapset/jstack-1.8.0.stp.in Tue Apr 26 18:36:01 2016 +0100
|
||||
+++ tapset/jstack-1.8.0.stp.in Wed Jul 13 14:06:31 2016 -0400
|
||||
@@ -45,22 +45,28 @@
|
||||
semantic error: failed to retrieve location attribute for local
|
||||
*/
|
||||
|
||||
-global CodeCache_heap;
|
||||
+/* Resolve multiple installed java versions conflict. */
|
||||
+@define _private %( %( systemtap_v >= "3.0" %? private %) %)
|
||||
+@define _check_match %(
|
||||
+ %( systemtap_v >= "3.0" %? if (pp() !~ "@prefix@") next %)
|
||||
+%)
|
||||
|
||||
-global sp_register;
|
||||
-global fp_register;
|
||||
-global pc_register;
|
||||
-global ptr_size;
|
||||
-global ptr_mask;
|
||||
+@_private global CodeCache_heap;
|
||||
|
||||
-global constantPool_size;
|
||||
-global HeapBlock_Header_size;
|
||||
+@_private global sp_register;
|
||||
+@_private global fp_register;
|
||||
+@_private global pc_register;
|
||||
+@_private global ptr_size;
|
||||
+@_private global ptr_mask;
|
||||
|
||||
-global vm_inited;
|
||||
+@_private global constantPool_size;
|
||||
+@_private global HeapBlock_Header_size;
|
||||
+
|
||||
+@_private global vm_inited;
|
||||
|
||||
/* We need to collect some global symbol addresses that cannot be resolved
|
||||
in a bare function and vm_init_end seems a good place to use. */
|
||||
-probe hotspot.vm_init_end
|
||||
+probe hotspot.vm_init_end8
|
||||
{
|
||||
/**
|
||||
* The CodeCache class contains the static CodeHeap _heap that
|
||||
@@ -116,6 +122,8 @@
|
||||
|
||||
function jstack:string()
|
||||
{
|
||||
+ @_check_match
|
||||
+
|
||||
// java backtraces can be a lot bigger, but we risk going over MAXACTION.
|
||||
// 32 frames only gives us ~32 actions per frame (with MAXACTION == 1024).
|
||||
max_depth = 32;
|
||||
@@ -125,6 +133,8 @@
|
||||
|
||||
function jstack_n:string(max_depth:long)
|
||||
{
|
||||
+ @_check_match
|
||||
+
|
||||
// Whether to log the method signatures.
|
||||
log_sig = 0;
|
||||
|
||||
@@ -139,6 +149,8 @@
|
||||
|
||||
function print_jstack()
|
||||
{
|
||||
+ @_check_match
|
||||
+
|
||||
// java backtraces can be a lot bigger, but we risk going over MAXACTION.
|
||||
// 32 frames only gives us ~32 actions per frame (with MAXACTION == 1024).
|
||||
max_depth = 32;
|
||||
@@ -148,6 +160,8 @@
|
||||
|
||||
function print_jstack_n:string(max_depth:long)
|
||||
{
|
||||
+ @_check_match
|
||||
+
|
||||
// Whether to log the method signatures.
|
||||
log_sig = 0;
|
||||
|
||||
@@ -162,6 +176,8 @@
|
||||
|
||||
function jstack_full:string()
|
||||
{
|
||||
+ @_check_match
|
||||
+
|
||||
// java backtraces can be a lot bigger, but we risk going over MAXACTION.
|
||||
// 32 frames only gives us ~32 actions per frame (with MAXACTION == 1024).
|
||||
max_depth = 32;
|
||||
@@ -171,6 +187,8 @@
|
||||
|
||||
function jstack_full_n:string(max_depth:long)
|
||||
{
|
||||
+ @_check_match
|
||||
+
|
||||
// Whether to log the method signatures.
|
||||
log_sig = 1;
|
||||
|
||||
@@ -185,6 +203,8 @@
|
||||
|
||||
function print_jstack_full()
|
||||
{
|
||||
+ @_check_match
|
||||
+
|
||||
// java backtraces can be a lot bigger, but we risk going over MAXACTION.
|
||||
// 32 frames only gives us ~32 actions per frame (with MAXACTION == 1024).
|
||||
max_depth = 32;
|
||||
@@ -194,6 +214,8 @@
|
||||
|
||||
function print_jstack_full_n:string(max_depth:long)
|
||||
{
|
||||
+ @_check_match
|
||||
+
|
||||
// Whether to log the method signatures.
|
||||
log_sig = 1;
|
||||
|
||||
@@ -209,6 +231,8 @@
|
||||
function jstack_call:string(max_depth:long, log_sig:long, log_native:long,
|
||||
print_frames:long)
|
||||
{
|
||||
+ @_check_match
|
||||
+
|
||||
if (! vm_inited[pid()])
|
||||
{
|
||||
frame = "<vm-not-inited>";
|
@ -817,7 +817,7 @@ Source2: README.src
|
||||
# They are based on code contained in the IcedTea7 project.
|
||||
|
||||
# Systemtap tapsets. Zipped up to keep it small.
|
||||
Source8: systemtap-tapset.tar.gz
|
||||
Source8: systemtap-tapset-3.1.0.tar.xz
|
||||
|
||||
# Desktop files. Adapated from IcedTea.
|
||||
Source9: jconsole.desktop.in
|
||||
@ -943,9 +943,6 @@ Patch525: pr1834-rh1022017.patch
|
||||
Patch529: corba_typo_fix.patch
|
||||
|
||||
# Non-OpenJDK fixes
|
||||
Patch300: jstack-pr1845.patch
|
||||
# PR3090, RH1204159: SystemTap is heavily confused by multiple JDKs
|
||||
Patch301: bz1204159_java8.patch
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
@ -1281,9 +1278,7 @@ sh %{SOURCE12}
|
||||
|
||||
# Extract systemtap tapsets
|
||||
%if %{with_systemtap}
|
||||
tar xzf %{SOURCE8}
|
||||
%patch300
|
||||
%patch301
|
||||
tar -x -I xz -f %{SOURCE8}
|
||||
%if %{include_debug_build}
|
||||
cp -r tapset tapset%{debug_suffix}
|
||||
%endif
|
||||
@ -1873,6 +1868,7 @@ require "copy_jdk_configs.lua"
|
||||
- used aarch64-port-jdk8u-aarch64-jdk8u102-b14.tar.xz as new sources
|
||||
- used aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u102-b14.tar.xz as new sources for hotspot
|
||||
- removed upstreamed patches 519 and 520
|
||||
- updated to systemtap 3, removed related patches 300 and 301
|
||||
|
||||
* Mon Aug 01 2016 Andrew Hughes <gnu.andrew@redhat.com> - 1:1.8.0.101-3.b14
|
||||
- Replace patch for S8162384 with upstream version. Document correctly along with SystemTap RH1204159 patch.
|
||||
|
@ -1,274 +0,0 @@
|
||||
diff -r c728621e76f2 tapset/jstack.stp.in
|
||||
--- tapset/jstack-1.8.0.stp.in Mon Jun 02 18:41:24 2014 +0100
|
||||
+++ tapset/jstack-1.8.0.stp.in Sat Jun 14 00:21:14 2014 +0900
|
||||
@@ -45,11 +45,7 @@
|
||||
semantic error: failed to retrieve location attribute for local
|
||||
*/
|
||||
|
||||
-global Universe_methodKlassObj;
|
||||
-global Universe_collectedHeap;
|
||||
-global HeapWordSize;
|
||||
global CodeCache_heap;
|
||||
-global NarrowOopStruct;
|
||||
|
||||
global sp_register;
|
||||
global fp_register;
|
||||
@@ -57,9 +53,8 @@
|
||||
global ptr_size;
|
||||
global ptr_mask;
|
||||
|
||||
-global constantPoolOopDesc_size;
|
||||
+global constantPool_size;
|
||||
global HeapBlock_Header_size;
|
||||
-global oopDesc_size;
|
||||
|
||||
global vm_inited;
|
||||
|
||||
@@ -67,26 +62,6 @@
|
||||
in a bare function and vm_init_end seems a good place to use. */
|
||||
probe hotspot.vm_init_end
|
||||
{
|
||||
- // The parent/type oop for a methodOop.
|
||||
- Universe_methodKlassObj[pid()] = %( systemtap_v >= "1.8"
|
||||
- %? @var("_methodKlassObj@universe.cpp")
|
||||
- %: $_methodKlassObj %);
|
||||
-
|
||||
- /**
|
||||
- * The Universe class holds some of the interesting statics for
|
||||
- * introspection into HotSpot. The CollectedHeap
|
||||
- * (Universe::_collectedHeap) is an abstraction of a java heap for Hotspot
|
||||
- * it contains a _reserved MemRegion which represents a contigous
|
||||
- * region of the address space consisting of HeapWords (which just
|
||||
- * have one field member char *i).
|
||||
- *
|
||||
- * Note that we access it through its "short name" _collectedHeap.
|
||||
- */
|
||||
- Universe_collectedHeap[pid()] = %( systemtap_v >= "1.8"
|
||||
- %? @var("_collectedHeap@universe.cpp")
|
||||
- %: $_collectedHeap %);
|
||||
- HeapWordSize[pid()] = $HeapWordSize;
|
||||
-
|
||||
/**
|
||||
* The CodeCache class contains the static CodeHeap _heap that
|
||||
* is malloced at the start of the vm run and holds all generated
|
||||
@@ -107,17 +82,6 @@
|
||||
%? @var("_heap@codeCache.cpp")
|
||||
%: $_heap %);
|
||||
|
||||
- /**
|
||||
- * Does target process use CompressedOops ?
|
||||
- */
|
||||
- NarrowOopStruct[pid()] = 0;
|
||||
- %( systemtap_v >= "1.8"
|
||||
- %? if (@var("UseCompressedOops@globals.cpp"))
|
||||
- NarrowOopStruct[pid()] = &@var("_narrow_oop@universe.cpp");
|
||||
- %: if($UseCompressedOops)
|
||||
- NarrowOopStruct[pid()] = $_narrow_oop;
|
||||
- %)
|
||||
-
|
||||
// Should really check arch of user space (for 32bit jvm on 64bit kernel).
|
||||
%( arch == "i386" %?
|
||||
sp_register = "esp";
|
||||
@@ -136,22 +100,17 @@
|
||||
|
||||
// Pretend we have an array at address zero and take address of second
|
||||
// element and we have the size.
|
||||
- constantPoolOopDesc_size = &@cast(0, "constantPoolOopDesc")[1];
|
||||
+ constantPool_size = &@cast(0, "ConstantPool")[1];
|
||||
|
||||
// Really should get from dwarf: @size("HeapBlock::Header"), @size("oopDesc")
|
||||
HeapBlock_Header_size = 2 * ptr_size;
|
||||
- oopDesc_size = 2 * ptr_size;
|
||||
|
||||
vm_inited[pid()] = 1;
|
||||
}
|
||||
|
||||
probe hotspot.vm_shutdown
|
||||
{
|
||||
- delete(Universe_methodKlassObj[pid()]);
|
||||
- delete(Universe_collectedHeap[pid()]);
|
||||
- delete(HeapWordSize[pid()]);
|
||||
delete(CodeCache_heap[pid()]);
|
||||
- delete(NarrowOopStruct[pid()]);
|
||||
delete(vm_inited[pid()]);
|
||||
}
|
||||
|
||||
@@ -262,15 +221,7 @@
|
||||
return frame;
|
||||
}
|
||||
|
||||
- // Extract heap and code bounds.
|
||||
- heap_start = @cast(Universe_collectedHeap[pid()],
|
||||
- "CollectedHeap",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_reserved->_start;
|
||||
- heap_size = HeapWordSize[pid()] * @cast(Universe_collectedHeap[pid()],
|
||||
- "CollectedHeap",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_reserved->_word_size;
|
||||
- heap_end = heap_start + heap_size;
|
||||
-
|
||||
+ // Extract code bounds.
|
||||
CodeCache_low = @cast(CodeCache_heap[pid()], "CodeHeap",
|
||||
"@ABS_SERVER_LIBJVM_SO@")->_memory->_low;
|
||||
CodeCache_high = @cast(CodeCache_heap[pid()], "CodeHeap",
|
||||
@@ -351,105 +302,69 @@
|
||||
// For the interpreter (and other code blobs) it is on the
|
||||
// stack relative to the frame pointer.
|
||||
if (blob_name == "nmethod")
|
||||
- methodOopPtr = @cast(blob, "nmethod",
|
||||
+ methodPtr = @cast(blob, "nmethod",
|
||||
"@ABS_SERVER_LIBJVM_SO@")->_method
|
||||
else
|
||||
- methodOopPtr = user_long(fp + (-3 * ptr_size)) & ptr_mask
|
||||
-
|
||||
- // Start optimistic. A methodOop is only valid if it was
|
||||
- // heap allocated. And if the "type class" oop equals the
|
||||
- // Universe::methodKlassObj.
|
||||
- if (heap_start > methodOopPtr || methodOopPtr >= heap_end)
|
||||
- isMethodOop = 0
|
||||
- else
|
||||
- {
|
||||
- if (NarrowOopStruct[pid()])
|
||||
- {
|
||||
- methodOopKlass = @cast(methodOopPtr, "methodOopDesc",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_metadata->_compressed_klass;
|
||||
- methodOopKlass = (@cast(NarrowOopStruct[pid()],
|
||||
- "NarrowOopStruct",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_base
|
||||
- + (methodOopKlass
|
||||
- << @cast(NarrowOopStruct[pid()],
|
||||
- "NarrowOopStruct",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_shift));
|
||||
- }
|
||||
- else
|
||||
- methodOopKlass = @cast(methodOopPtr, "methodOopDesc",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_metadata->_klass;
|
||||
+ methodPtr = user_long(fp + (-3 * ptr_size)) & ptr_mask
|
||||
|
||||
- isMethodOop = (methodOopKlass == Universe_methodKlassObj[pid()]);
|
||||
- }
|
||||
+ // The java class is the holder of the constants (strings)
|
||||
+ // that describe the method and signature. This constant pool
|
||||
+ // contains symbolic information that describe the properties
|
||||
+ // of the class. The indexes for methods and signaturates in
|
||||
+ // the constant pool are Symbols that contain utf8
|
||||
+ // strings (plus lenghts). (We could also sanity check that
|
||||
+ // the tag value is correct [CONSTANT_String = 8]).
|
||||
+ // Note that the class name uses '/' instead of '.' as
|
||||
+ // package name separator and that the method signature is
|
||||
+ // encoded as a method descriptor string. Both of which we
|
||||
+ // don't demangle here.
|
||||
+ constMethod = @cast(methodPtr, "Method",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_constMethod;
|
||||
+ constantPool = @cast(constMethod, "ConstMethod",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_constants;
|
||||
+ constantPool_base = constantPool + constantPool_size;
|
||||
+
|
||||
+ klass = @cast(constantPool, "ConstantPool",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_pool_holder;
|
||||
+ klassSymbol = @cast(klass, "Klass",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_name;
|
||||
+ klassName = &@cast(klassSymbol, "Symbol",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_body[0];
|
||||
+ klassLength = @cast(klassSymbol, "Symbol",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_length;
|
||||
+
|
||||
+ methodIndex = @cast(constMethod, "ConstMethod",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_name_index;
|
||||
+ methodSymbol = user_long(constantPool_base + (methodIndex * ptr_size));
|
||||
+ methodName = &@cast(methodSymbol, "Symbol",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_body[0];
|
||||
+ methodLength = @cast(methodSymbol, "Symbol",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_length;
|
||||
|
||||
- if (isMethodOop)
|
||||
+ if (log_sig)
|
||||
{
|
||||
- // The java class is the holder of the constants (strings)
|
||||
- // that describe the method and signature. This constant pool
|
||||
- // contains symbolic information that describe the properties
|
||||
- // of the class. The indexes for methods and signaturates in
|
||||
- // the constant pool are Symbols that contain utf8
|
||||
- // strings (plus lenghts). (We could also sanity check that
|
||||
- // the tag value is correct [CONSTANT_String = 8]).
|
||||
- // Note that the class name uses '/' instead of '.' as
|
||||
- // package name separator and that the method signature is
|
||||
- // encoded as a method descriptor string. Both of which we
|
||||
- // don't demangle here.
|
||||
- constantPoolOopDesc = @cast(methodOopPtr, "methodOopDesc",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_constants;
|
||||
- constantPoolOop_base = constantPoolOopDesc + constantPoolOopDesc_size;
|
||||
-
|
||||
- klassPtr = @cast(constantPoolOopDesc, "constantPoolOopDesc",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_pool_holder;
|
||||
- klassSymbol = @cast(klassPtr + oopDesc_size, "Klass",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_name;
|
||||
- klassName = &@cast(klassSymbol, "Symbol",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_body[0];
|
||||
- klassLength = @cast(klassSymbol, "Symbol",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_length;
|
||||
-
|
||||
- methodIndex = @cast(methodOopPtr, "methodOopDesc",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_constMethod->_name_index;
|
||||
- methodOopDesc = user_long(constantPoolOop_base + (methodIndex * ptr_size)) - 1;
|
||||
- methodName = &@cast(methodOopDesc, "Symbol",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_body[0];
|
||||
- methodLength = @cast(methodOopDesc, "Symbol",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_length;
|
||||
-
|
||||
- if (log_sig)
|
||||
- {
|
||||
- sigIndex = @cast(methodOopPtr, "methodOopDesc",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_constMethod->_signature_index;
|
||||
- sigOopDesc = user_long(constantPoolOop_base
|
||||
- + (sigIndex * ptr_size)) - 1;
|
||||
- sigName = &@cast(sigOopDesc, "Symbol",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_body[0];
|
||||
- sigLength = @cast(sigOopDesc, "Symbol",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_length;
|
||||
- sig = user_string_n(sigName, sigLength);
|
||||
- }
|
||||
- else
|
||||
- sig = "";
|
||||
-
|
||||
- code_name = (log_native
|
||||
- ? sprintf("<%s@0x%x>",
|
||||
- str_replace(blob_name, " ", "_"), pc)
|
||||
- : "");
|
||||
-
|
||||
- frame = sprintf("%s.%s%s%s",
|
||||
- user_string_n(klassName, klassLength),
|
||||
- user_string_n(methodName, methodLength),
|
||||
- sig, code_name);
|
||||
+ sigIndex = @cast(constMethod, "ConstMethod",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_signature_index;
|
||||
+ sigSymbol = user_long(constantPool_base
|
||||
+ + (sigIndex * ptr_size));
|
||||
+ sigName = &@cast(sigSymbol, "Symbol",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_body[0];
|
||||
+ sigLength = @cast(sigSymbol, "Symbol",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_length;
|
||||
+ sig = user_string_n(sigName, sigLength);
|
||||
}
|
||||
else
|
||||
- {
|
||||
- // This is probably just an internal function, not a java
|
||||
- // method, just print the blob_name and continue.
|
||||
- // fp is probably still trusted.
|
||||
- if (log_native)
|
||||
- frame = sprintf("<%s@0x%x>",
|
||||
- str_replace(blob_name, " ", "_"), pc);
|
||||
- }
|
||||
+ sig = "";
|
||||
+
|
||||
+ code_name = (log_native
|
||||
+ ? sprintf("<%s@0x%x>",
|
||||
+ str_replace(blob_name, " ", "_"), pc)
|
||||
+ : "");
|
||||
+
|
||||
+ frame = sprintf("%s.%s%s%s",
|
||||
+ user_string_n(klassName, klassLength),
|
||||
+ user_string_n(methodName, methodLength),
|
||||
+ sig, code_name);
|
||||
|
||||
// We cannot trust the frame pointer of compiled methods.
|
||||
// The server (c2) jit compiler uses the fp register.
|
2
sources
2
sources
@ -1,3 +1,3 @@
|
||||
94ca5a45c3cb3b85c4577d0891166007 systemtap-tapset.tar.gz
|
||||
822e321b710defc8f9c8ec97a6f34b55 systemtap-tapset-3.1.0.tar.xz
|
||||
fd982589a6345c6dd3698256bed45d3d aarch64-port-jdk8u-aarch64-jdk8u102-b14.tar.xz
|
||||
76ebec7a595c567a66b9d15fdc530a56 aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u102-b14.tar.xz
|
||||
|
Loading…
Reference in New Issue
Block a user