interface
jsc.SamplingProfile
interface SamplingProfile
The result of profile: two human-readable reports plus the raw samples they were computed from.
- bytecodes: string
A formatted breakdown of the samples by execution tier, followed by the individual bytecode locations that were sampled most often. Useful for seeing which tier hot code is running in: time spent in
LLIntorBaselinemeans the code has not been optimized (yet).Example output:
Tier breakdown: ----------------------------------- LLInt: 106 (1.545640%) Baseline: 2355 (34.339458%) DFG: 3290 (47.973170%) FTL: 833 (12.146398%) js builtin: 132 (1.924759%) Wasm: 0 (0.000000%) Host: 111 (1.618548%) RegExp: 15 (0.218723%) C/C++: 0 (0.000000%) Unknown Executable: 148 (2.158064%) Hottest bytecodes as <numSamples 'functionName#hash:JITType:bytecodeIndex'> 273 'visit#<nil>:DFG:bc#63' 121 'walk#<nil>:DFG:bc#7' 119 '#<nil>:Baseline:bc#1' 82 'Function#<nil>:None:<nil>' 66 '#<nil>:DFG:bc#11' 65 '#<nil>:DFG:bc#33' 58 '#<nil>:Baseline:bc#7' 53 '#<nil>:Baseline:bc#23' 50 'forEach#<nil>:DFG:bc#83' 49 'pop#<nil>:FTL:bc#65' 47 '#<nil>:DFG:bc#99' 45 '#<nil>:DFG:bc#16' 44 '#<nil>:DFG:bc#7' 44 '#<nil>:Baseline:bc#30' 44 'push#<nil>:FTL:bc#214' 41 '#<nil>:DFG:bc#50' 39 'get#<nil>:DFG:bc#27' 39 '#<nil>:Baseline:bc#0' 36 '#<nil>:DFG:bc#27' 36 'Dictionary#<nil>:DFG:bc#41' 36 'visit#<nil>:DFG:bc#81' 36 'get#<nil>:FTL:bc#11' 32 'push#<nil>:FTL:bc#49' 31 '#<nil>:DFG:bc#76' 31 '#<nil>:DFG:bc#10' 31 '#<nil>:DFG:bc#73' 29 'set#<nil>:DFG:bc#28' 28 'in_boolean_context#<nil>:DFG:bc#104' 28 '#<nil>:Baseline:<nil>' 28 'regExpSplitFast#<nil>:None:<nil>' 26 'visit#<nil>:DFG:bc#95' 26 'pop#<nil>:FTL:bc#120' 25 '#<nil>:DFG:bc#23' 25 'push#<nil>:FTL:bc#152' 24 'push#<nil>:FTL:bc#262' 24 '#<nil>:FTL:bc#10' 23 'is_identifier_char#<nil>:DFG:bc#22' 23 'visit#<nil>:DFG:bc#22' 22 '#<nil>:FTL:bc#27' 22 'indexOf#<nil>:None:<nil>' - functions: string
A formatted summary of the functions that were most often at the top of the stack when a sample was taken (that is, ranked by self time). Each entry shows the number of samples, the function name, its code hash, and the ID of its source file.
Example output:
Sampling rate: 100.000000 microseconds. Total samples: 6858 Top functions as <numSamples 'functionName#hash:sourceID'> 2948 '#<nil>:8' 393 'visit#<nil>:8' 263 'push#<nil>:8' 164 'scan_ref_scoped#<nil>:8' 164 'walk#<nil>:8' 144 'pop#<nil>:8' 107 'extract_candidates#<nil>:8' 94 'get#<nil>:8' 82 'Function#<nil>:4294967295' 79 'set#<nil>:8' 67 'forEach#<nil>:5' 58 'collapse#<nil>:8' - stackTraces: SamplingProfileStackTraces
The raw samples: the full stack captured at each sampling interval, which is what
functionsandbytecodesare computed from. Use this to build your own reports, such as a flame graph or inclusive timings.