2121 ((value & V8_SmiTagMask) == V8_SmiTag)
2222#define SMI_VALUE (value ) \
2323 ((uint32_t) ((value) >> V8_SmiValueShift))
24+ #define NO_SHARED_FUNCTION_NAME_SENTINEL NULL
2425
2526/*
2627 * Heap objects usually start off with a Map pointer, itself another heap
@@ -372,7 +373,8 @@ dtrace:helper:ustack:
372373 this -> shared = (off_t ) 0 ;
373374 this -> map = (off_t ) 0 ;
374375 this -> attrs = 0 ;
375- this -> funcnamestr = (off_t ) 0 ;
376+ this -> funcrawnamestr = (off_t ) 0 ;
377+ this -> hassharedname = 0 ;
376378 this -> funcnamelen = 0 ;
377379 this -> funcnameattrs = 0 ;
378380 this -> script = (off_t ) 0 ;
@@ -515,9 +517,16 @@ dtrace:helper:ustack:
515517 this -> attrs = 0 ;
516518
517519 this -> shared = COPYIN_PTR (this -> func + V8_OFF_FUNC_SHARED );
518- this -> funcnamestr = COPYIN_PTR (this -> shared + V8_OFF_SHARED_NAME );
519- LOAD_STRFIELDS (this -> funcnamestr , this -> funcnamelen ,
520- this -> funcnameattrs );
520+ this -> funcrawnamestr = COPYIN_PTR (this -> shared + V8_OFF_RAW_NAME );
521+ this -> hassharedname = this -> funcrawnamestr !=
522+ NO_SHARED_FUNCTION_NAME_SENTINEL ;
523+ }
524+
525+ dtracr :helper :ustack :
526+ /!this -> done && this -> hassharedname /
527+ {
528+ LOAD_STRFIELDS (this -> funcrawnamestr , this -> funcnamelen ,
529+ this -> funcnameattrs );
521530}
522531
523532dtrace :helper :ustack :
@@ -532,8 +541,8 @@ dtrace:helper:ustack:
532541 APPEND_CHR ('s' );
533542 APPEND_CHR (' ' );
534543
535- this -> funcnamestr = COPYIN_PTR (this -> shared + V8_OFF_SHARED_IDENT );
536- LOAD_STRFIELDS (this -> funcnamestr , this -> funcnamelen ,
544+ this -> funcrawnamestr = COPYIN_PTR (this -> shared + V8_OFF_SHARED_IDENT );
545+ LOAD_STRFIELDS (this -> funcrawnamestr , this -> funcnamelen ,
537546 this -> funcnameattrs );
538547}
539548
@@ -545,7 +554,7 @@ dtrace:helper:ustack:
545554 APPEND_CHR (')' );
546555}
547556
548- APPEND_V8STR (this -> funcnamestr , this -> funcnamelen , this -> funcnameattrs )
557+ APPEND_V8STR (this -> funcrawnamestr , this -> funcnamelen , this -> funcnameattrs )
549558
550559/*
551560 * Now look for the name of the script where the function was defined. The
0 commit comments