Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "MemoryAnalyzer/OQL"

(Object Query Language)
Line 41: Line 41:
 
''[I@620f7a39'' is a regular Java integer array holding a several of ints which are the object IDs Memory Analyzer uses
 
''[I@620f7a39'' is a regular Java integer array holding a several of ints which are the object IDs Memory Analyzer uses
 
to represent IObjects in the snapshot.
 
to represent IObjects in the snapshot.
 +
 +
 +
== OQL (Memory Analyzer) versus SQL (MAT/Calcite) ==
 +
 +
As well as the built-in OQL, there is an extension plug-in for MAT called MAT Calcite which adds SQL processing
 +
 +
{|
 +
|-
 +
!Topic
 +
!OQL
 +
!SQL
 +
|-
 +
|General syntax
 +
|SELECT s FROM java.lang.String
 +
|SELECT s.this FROM java.lang.String
 +
|-
 +
|}

Revision as of 05:15, 14 November 2019

Object Query Language

Object Query Language is an SQL like language used by Memory Analyzer for exploring a heap dump.

Simple

SELECT * FROM java.lang.String

Displays all String objects as a tree.

SELECT s as String,s.value as "characters" FROM java.lang.String s

Displays all String objects as a table.

SELECT s as String,s.value as "characters", inbounds(s),inbounds(s).@length FROM java.lang.String s

String                          |characters                                 |inbounds(s)| inbounds(s).@length
--------------------------------------------------------------------------------------------------------------
java.lang.String [id=0x22e58820]|char[] [id=0x22e60f50;length=16;size=48]   |[I@620f7a39|                   1
java.lang.String [id=0x22e59150]|char[] [id=0x22e62ff0;length=6;size=24]    |[I@1f7b8d59|                   1
java.lang.String [id=0x22e5b560]|char[] [id=0x22e6b730;length=537;size=1088]|[I@28551755|                   1
--------------------------------------------------------------------------------------------------------------

There are two sorts of objects encountered with OQL, IObject which represent Java objects in the snapshot and regular Java objects generated by OQL processing.

java.lang.String [id=0x22e58820] is a IInstance representing a String from the snapshot.

char[] [id=0x22e60f50;length=16;size=48] is an IPrimitiveArray representing a character array from the snapshot.

[I@620f7a39 is a regular Java integer array holding a several of ints which are the object IDs Memory Analyzer uses to represent IObjects in the snapshot.


OQL (Memory Analyzer) versus SQL (MAT/Calcite)

As well as the built-in OQL, there is an extension plug-in for MAT called MAT Calcite which adds SQL processing

Topic OQL SQL
General syntax SELECT s FROM java.lang.String SELECT s.this FROM java.lang.String

Back to the top