incubator-kato-spec mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Julin <...@us.ibm.com>
Subject Re: System Properties and Env vars
Date Thu, 14 Jan 2010 03:12:15 GMT

Steve Poole <spoole167@googlemail.com> wrote on 2010-01-12 03:33:21 AM:
> Yes that's right.    I'm sure we'd all be interested in knowing more
about
> these utilitiy modules you mention -  could you provide a basic  1 liner
> description for the most important ones?

Here is a list of the most common utility modules/functions from the
DTFJ-DumpAnalyzer library, that I had prepared quite a while ago... The
name of the module is in square brackets.

(1) Given a JavaObject, extract the value of a field specified by its name
(without having to enumerate through all the fields to find the right one).
Also deal with field inherited from superclasses, etc. - [OneJavaObject]

(2) Given a JavaClass, extract the value of a static field specified by its
name, taking into account superclasses, etc. (same as (1) above, but for
static fields) - [OneJavaClass]

(3) Given a JavaObject or JavaClass as a starting point, extract the value
at the end of a sequence of fields, represented as path expression (e.g.
X/Y/Z: field X is a pointer to object that contains field Y, which itself
is a pointer to an object that contains field Z) - [ObjectWrapper]

(4) Given a JavaObject and a field that happens to be a reference to an
array or an instance of the Java Collections framework, extract the
contents of that collection, rather than just a reference to the collection
or the fields that happen to be part of the internal implementation of that
collection class - [ObjectWrapper + specialized wrappers]

(5) Extend function (4) to deal not just with arrays and the standard Java
Collection classes, but with arbitrary application classes, by providing a
specialized "wrapper" analyzer that defines how to interpret the contents
of that particular application class - [ObjectWrapper + specialized
wrappers]

(6) Print the content of a field or collection as extracted by one of the
functions (1), (2), (3), (4), (5) above, in a way such that all possible
errors are handled internally and simply printed instead of the desired
value, rather than forcing the programmer to explicitly catch and handle
all exceptions in his/her code - [ObjectWrapper]

(7) Extend function (6) above to allow the caller to specify a special
"wrapper" analyzer that prints the desired contents in a particular format
instead of the default format. For example, instead of printing all the
entries in a collection, the "wrapper" could filter the entries and only
print the relevant ones. Several variations to deal with Sets, Maps,
individual objects, etc. [ObjectWrapper + specialized wrappers]

(8) List all definitions of a given class, specified by name, accounting
for the fact that there could be multiple definitions of the same class
present in different classloaders in the dump. [ClassFinder]

(9) List all definitions of a given class, specified by name, and all its
subclasses, present in the dump. [ClassFinder]

(10) Extend function (9) above to accept the name of an interface instead
of a class, and find all the sub-interfaces and all classes that implement
that interface or any of its sub-interfaces. [ClassFinder]

(11) Find the JavaClass that represents a given interface, specified by its
name. [ClassFinder]

(12) Get a count of all the class definitions present in the dump
[ClassFinder]

(13) List all instances of a given class (accounting for the fact that the
class may have multiple definitions in different classloaders, as noted in
function (8) above) [ObjectFinder]

(14) List all instances of a given class or any of it subclasses, or all
instances that implement a given interface or any of its sub-interfaces.
[ObjectFinder]

(15) Get a count of all the object instances of a given class, or all the
object instances of any class, or all the instances of primitive arrays, or
all the instances of object arrays [ObjectFinder]

(16) Given an address (ImagePointer), find the JavaClass or JavaObject or
JavaThread or other entity whose ID matches that address
[LookupObjectByAddress]

(17) List all the object references outbound from a given JavaObject
[OneJavaObject]

(18) Get a canonical type signature for a given JavaObject or JavaClass
(e.g. "[Lmypackage.myclass;") [OneJavaObject, OneJavaClass]

(19) Enumerate all the fields from a given JavaClass, including all field
inherited from superclasses and not masked [OneJavaClass]

(20) Variations on function (19) above, that filters to enumerate only
static fields, or only fields that match particular criteria [OneJavaClass]

(21) Print the content of a field in a given JavaObject, but mask that
content if the field happens to be a password (as specified by a regular
expression for the name of the field) [ObjectWrapper]

(22) Get a count of all the JavaThreads, all the ImageThreads, all the
methods with bytecodes, all the compiled methods, etc. without having to
explicitly enumerate through them [AllJavaThreads, AllImageThreads,
AllBytecodeMethods, AllCompiledMethods]

(23) Given a thread ID, find the corresponding ImageThread
[AllImageThreads]

(24) Given a ImageThread, find the JavaThread that is associated with that
ImageThread [AllImageThreads, AllJavaThreads]

(25) List all the ImageThreads that are not associated with a JavaThread
[not currently implemented]

(26) Given a JavaThread, find the JavaMonitor that this thread is currently
waiting on (if any) [OneJavaThread]

(27) Given a JavaThread, find all the JavaMonitors that are currently owned
by this thread [AllJavaMonitors]

(28) Given a JavaObject that happens to represent a java/lang/Thread, find
the corresponding JavaThread [AllJavaThreads]

(29) Given a JavaObject that happens to represent a java/lang/Class, find
the corresponding JavaClass [not implemented?]

(30) Given a ImageModule or JavaHeap, find the total size allocated to this
area [OneImageModule, OneJavaHeap]

(31) Given a ImagePointer and a ImageSection, check if that address falls
within that section [OneImageSection]

(32) Annotate an ImageSection with a user-specified description, that
replaces the default section name which if often not useful
[OneImageSection]

(33) Given a ImageStackFrame or JavaStackFrame, check if it is identical to
another frame (to detect duplicate frames in stack traces)
[OneImageStackFrame, OneJavaStackFrame]

(34) Given a ImageThread and a register name, get the value of that
register without having to enumerate through all registers [OneImageThread]

(35) Given a ImageThread, get the address at the top of the stack,
accounting for the fact that the stack pointer is maintained in different
registers (and different directions) on different platforms
[OneImageThread, partial implementation]

(36) Given a JavaHeap, get the current used space, free space, etc. and as
many other GC-related statistics as possible [not implemented]

(37) List all the ImageSections associated with all JavaHeaps, or all
JavaThreads, or all ImageModules, or all compiled methods, etc.
[SectionsTableBase + All* analyzers for each type]



==============================================================
Daniel P. Julin
Senior Technical Staff Member
Technical Area Lead  -  IBM AIM WebSphere Serviceability Team

EMail: dpj@us.ibm.com
Phone: 347-273-2093          Tie-line 930-3468
Notes: Daniel Julin/Pittsburgh/IBM@IBMUS



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message