3 struct profiling_sample
{
4 // Active thread during sample
6 // The callstack at safepoint time. Indexes to the beginning and ending
7 // word entries in the vm sample_callstacks array.
8 cell callstack_begin
, callstack_end
;
10 // Number of samples taken before the safepoint that recorded the sample
12 // Number of samples taken during GC
13 fixnum gc_sample_count
;
14 // Number of samples taken during unoptimized compiler
15 fixnum jit_sample_count
;
16 // Number of samples taken during foreign code execution
17 fixnum foreign_sample_count
;
18 // Number of samples taken during code execution in non-Factor threads
19 fixnum foreign_thread_sample_count
;
21 profiling_sample(fixnum sample_count
, fixnum gc_sample_count
,
22 fixnum jit_sample_count
, fixnum foreign_sample_count
,
23 fixnum foreign_thread_sample_count
)
27 sample_count(sample_count
),
28 gc_sample_count(gc_sample_count
),
29 jit_sample_count(jit_sample_count
),
30 foreign_sample_count(foreign_sample_count
),
31 foreign_thread_sample_count(foreign_thread_sample_count
) {}
33 profiling_sample
record_counts() volatile;
34 void clear_counts() volatile;
36 return sample_count
+ gc_sample_count
+ jit_sample_count
+
37 foreign_sample_count
+ foreign_thread_sample_count
==