Skip to content

Commit 8d89e97

Browse files
committed
GH-430 logical value for PString fixed; TruffleString added to includeInstance()
1 parent b97b035 commit 8d89e97

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

visualvm/heapviewer.truffle/src/org/graalvm/visualvm/heapviewer/truffle/lang/python/PythonDetailsProvider.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ public String getDetailsString(String className, Instance instance) {
131131
return name;
132132
}
133133
if (PSTRING_MASK.equals(className)) {
134+
String val = DetailsUtils.getInstanceFieldString(instance, "materializedValue"); // NOI18N
135+
if (val != null) return val;
134136
return DetailsUtils.getInstanceFieldString(instance, "value"); // NOI18N
135137
}
136138
if (PBUILTIN_CLASSTYPE_MASK.equals(className)) {

visualvm/heapviewer.truffle/src/org/graalvm/visualvm/heapviewer/truffle/lang/python/PythonObjectProperties.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ protected boolean includeInstance(Instance instance) {
9595

9696
if (className.startsWith("java.lang.") || // NOI18N
9797
className.startsWith("java.math.") || // NOI18N
98-
className.startsWith("com.oracle.graal.python.runtime.datatype.")) // NOI18N
98+
className.startsWith("com.oracle.graal.python.runtime.datatype.") || // NOI18N
99+
className.startsWith("com.oracle.truffle.api.strings.")) // NOI18N
99100
return true;
100101

101102
return false;
@@ -150,7 +151,8 @@ protected boolean includeInstance(Instance instance) {
150151

151152
if (className.startsWith("java.lang.") || // NOI18N
152153
className.startsWith("java.math.") || // NOI18N
153-
className.startsWith("com.oracle.graal.python.runtime.datatype.")) // NOI18N
154+
className.startsWith("com.oracle.graal.python.runtime.datatype.") || // NOI18N
155+
className.startsWith("com.oracle.truffle.api.strings.")) // NOI18N
154156
return true;
155157

156158
return false;

0 commit comments

Comments
 (0)