21
21
((value & V8_SmiTagMask) == V8_SmiTag)
22
22
#define SMI_VALUE (value ) \
23
23
((uint32_t) ((value) >> V8_SmiValueShift))
24
+ #define NO_SHARED_FUNCTION_NAME_SENTINEL NULL
24
25
25
26
/*
26
27
* Heap objects usually start off with a Map pointer, itself another heap
@@ -372,7 +373,8 @@ dtrace:helper:ustack:
372
373
this -> shared = (off_t ) 0 ;
373
374
this -> map = (off_t ) 0 ;
374
375
this -> attrs = 0 ;
375
- this -> funcnamestr = (off_t ) 0 ;
376
+ this -> funcrawnamestr = (off_t ) 0 ;
377
+ this -> hassharedname = 0 ;
376
378
this -> funcnamelen = 0 ;
377
379
this -> funcnameattrs = 0 ;
378
380
this -> script = (off_t ) 0 ;
@@ -515,9 +517,16 @@ dtrace:helper:ustack:
515
517
this -> attrs = 0 ;
516
518
517
519
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 );
521
530
}
522
531
523
532
dtrace :helper :ustack :
@@ -532,8 +541,8 @@ dtrace:helper:ustack:
532
541
APPEND_CHR ('s' );
533
542
APPEND_CHR (' ' );
534
543
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 ,
537
546
this -> funcnameattrs );
538
547
}
539
548
@@ -545,7 +554,7 @@ dtrace:helper:ustack:
545
554
APPEND_CHR (')' );
546
555
}
547
556
548
- APPEND_V8STR (this -> funcnamestr , this -> funcnamelen , this -> funcnameattrs )
557
+ APPEND_V8STR (this -> funcrawnamestr , this -> funcnamelen , this -> funcnameattrs )
549
558
550
559
/*
551
560
* Now look for the name of the script where the function was defined. The
0 commit comments