@@ -107,32 +107,32 @@ static inline bool isZeroSizeFrame(const char* name) {
107107 return strncmp (name, " atomic" , 6 ) == 0 ;
108108 case ' b' :
109109 return strncmp (name, " bigInteger" , 10 ) == 0
110- || strcmp (name, " base64_encodeBlock" ) == 0 ;
110+ || strncmp (name, " base64_encodeBlock" , 18 ) == 0
111+ || strcmp (name, " backward_copy_longs" ) == 0 ;
111112 case ' c' :
112113 return strncmp (name, " copy_" , 5 ) == 0
113114 || strncmp (name, " compare_long_string_" , 20 ) == 0 ;
114115 case ' e' :
115116 return strcmp (name, " encodeBlock" ) == 0 ;
116117 case ' f' :
117- return strcmp (name, " f2hf" ) == 0 ;
118+ return strncmp (name, " f2hf" , 4 ) == 0
119+ || strcmp (name, " forward_copy_longs" ) == 0
120+ || strcmp (name, " foward_copy_longs" ) == 0 ; // there is a typo in JDK 8
118121 case ' g' :
119- return strcmp (name, " ghash_processBlocks" ) == 0 ;
122+ return strncmp (name, " ghash_processBlocks" , 19 ) == 0 && strchr (name + 19 , ' w ' ) == NULL ;
120123 case ' h' :
121- return strcmp (name, " hf2f" ) == 0 ;
124+ return strncmp (name, " hf2f" , 4 ) == 0 ;
122125 case ' i' :
123126 return strncmp (name, " itable" , 6 ) == 0 ;
124127 case ' l' :
125- return strcmp (name, " large_byte_array_inflate" ) == 0
128+ return strncmp (name, " large_byte_array_inflate" , 24 ) == 0
126129 || strncmp (name, " lookup_secondary_supers_" , 24 ) == 0 ;
127130 case ' m' :
128131 return strncmp (name, " md5_implCompress" , 16 ) == 0 ;
129132 case ' s' :
130- return strncmp (name, " sha1_implCompress" , 17 ) == 0
131- || strncmp (name, " compare_long_string_same_encoding" , 33 ) == 0
132- || strcmp (name, " compare_long_string_LL" ) == 0
133- || strcmp (name, " compare_long_string_UU" ) == 0 ;
133+ return strncmp (name, " sha1_implCompress" , 17 ) == 0 ;
134134 case ' u' :
135- return strcmp (name, " updateBytesAdler32" ) == 0 ;
135+ return strncmp (name, " updateBytesAdler32" , 18 ) == 0 ;
136136 case ' v' :
137137 return strncmp (name, " vtable" , 6 ) == 0 ;
138138 case ' z' :
@@ -172,21 +172,6 @@ bool StackFrame::unwindStub(instruction_t* entry, const char* name, uintptr_t& p
172172 // Should be done after isSTP check, since frame size may vary between JVM versions
173173 pc = link ();
174174 return true ;
175- } else if (strcmp (name, " forward_copy_longs" ) == 0
176- || strcmp (name, " backward_copy_longs" ) == 0
177- // There is a typo in JDK 8
178- || strcmp (name, " foward_copy_longs" ) == 0 ) {
179- // These are called from arraycopy stub that maintains the regular frame link
180- if (&pc == &this ->pc () && withinCurrentStack (fp)) {
181- // Unwind both stub frames for AsyncGetCallTrace
182- sp = fp + 16 ;
183- fp = ((uintptr_t *)sp)[-2 ];
184- pc = ((uintptr_t *)sp)[-1 ] - sizeof (instruction_t );
185- } else {
186- // When cstack=vm, unwind stub frames one by one
187- pc = link ();
188- }
189- return true ;
190175 }
191176 return false ;
192177}
0 commit comments