This is the code after the OopStorage patch:
http://cr.openjdk.java.net/~kbarrett/8194312/open.00/src/hotspot/share/services/serviceUtil.hpp.frames.html
36 class ServiceUtil : public AllStatic {
37 public:
38
39 // Return true if oop represents an object that is "visible"
40 // to the java world.
41 static inline bool visible_oop(oop o) {
42 // instance
43 if (o->is_instance()) {
44 // instance objects are visible
45 if (o->klass() != SystemDictionary::Class_klass()) {
46 return true;
47 }
48 if (java_lang_Class::is_primitive(o)) {
49 return true;
50 }
51 // java.lang.Classes are visible
52 Klass* k = java_lang_Class::as_Klass(o);
53 if (k->is_klass()) {
54 // if it's a class for an object, an object array, or
55 // primitive (type) array then it's visible.
56 if (k->is_instance_klass()) {
57 return true;
58 }
59 if (k->is_objArray_klass()) {
60 return true;
61 }
62 if (k->is_typeArray_klass()) {
63 return true;
64 }
65 }
66 return false;
67 }
68 // object arrays are visible if they aren't system object arrays
69 if (o->is_objArray()) {
70 return true;
71 }
72 // type arrays are visible
73 if (o->is_typeArray()) {
74 return true;
75 }
76 // everything else (Method*s, ...) aren't visible
77 return false;
78 }; // end of visible_oop()
79
80 };
Neither of the two return false statements are reachable, so this function could be removed.
http://cr.openjdk.java.net/~kbarrett/8194312/open.00/src/hotspot/share/services/serviceUtil.hpp.frames.html
36 class ServiceUtil : public AllStatic {
37 public:
38
39 // Return true if oop represents an object that is "visible"
40 // to the java world.
41 static inline bool visible_oop(oop o) {
42 // instance
43 if (o->is_instance()) {
44 // instance objects are visible
45 if (o->klass() != SystemDictionary::Class_klass()) {
46 return true;
47 }
48 if (java_lang_Class::is_primitive(o)) {
49 return true;
50 }
51 // java.lang.Classes are visible
52 Klass* k = java_lang_Class::as_Klass(o);
53 if (k->is_klass()) {
54 // if it's a class for an object, an object array, or
55 // primitive (type) array then it's visible.
56 if (k->is_instance_klass()) {
57 return true;
58 }
59 if (k->is_objArray_klass()) {
60 return true;
61 }
62 if (k->is_typeArray_klass()) {
63 return true;
64 }
65 }
66 return false;
67 }
68 // object arrays are visible if they aren't system object arrays
69 if (o->is_objArray()) {
70 return true;
71 }
72 // type arrays are visible
73 if (o->is_typeArray()) {
74 return true;
75 }
76 // everything else (Method*s, ...) aren't visible
77 return false;
78 }; // end of visible_oop()
79
80 };
Neither of the two return false statements are reachable, so this function could be removed.