Mercurial > hg > release > icedtea7-2.2
changeset 2523:d679a8e581ec
* tapset/jstack.stp.in: Don't hard code constantPoolOopDesc_size.
The size of constantPoolOopDesc had changed, but it was hard coded.
We use a trick now to calculate it from the DWARF data. Pretend we have
an array at address zero and take address of second element and we have
the size.
author | Mark Wielaard <mark@klomp.org> |
---|---|
date | Tue, 13 Mar 2012 16:29:10 +0100 |
parents | 5f0d96a60071 |
children | 91870f1e0c92 |
files | ChangeLog tapset/jstack.stp.in |
diffstat | 2 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Feb 27 11:43:26 2012 -0500 +++ b/ChangeLog Tue Mar 13 16:29:10 2012 +0100 @@ -1,3 +1,7 @@ +2012-03-13 Mark Wielaard <mjw@redhat.com> + + * tapset/jstack.stp.in: Don't hard code constantPoolOopDesc_size. + 2012-02-24 Deepak Bhole <dbhole@redhat.com> PR885: IcedTea7 does not build scripting support
--- a/tapset/jstack.stp.in Mon Feb 27 11:43:26 2012 -0500 +++ b/tapset/jstack.stp.in Tue Mar 13 16:29:10 2012 +0100 @@ -1,5 +1,5 @@ /* jstack systemtap tapset, for extracting hotspot java backtraces. - Copyright (C) 2009, Red Hat Inc. + Copyright (C) 2009, 2012 Red Hat Inc. This file is part of IcedTea. @@ -110,17 +110,19 @@ pc_register = "eip"; ptr_size = 4; ptr_mask = 0xFFFFFFFF; - constantPoolOopDesc_size = 32; // Should use dwarf @size %: %(arch == "x86_64" %? sp_register = "rsp"; fp_register = "rbp"; pc_register = "rip"; ptr_size = 8; // XXX - might be probing 32-on-64 jvm. ptr_mask = 0xFFFFFFFFFFFFFFFF; - constantPoolOopDesc_size = 56; // Should use dwarf @size %: **ERROR** unknown architecture %) %) + // 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]; + // Really should get from dwarf: @size("HeapBlock::Header"), @size("oopDesc") HeapBlock_Header_size = 2 * ptr_size; oopDesc_size = 2 * ptr_size;