File tree 1 file changed +7
-2
lines changed 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,13 @@ const (
60
60
// Timestamps in trace are cputicks/traceTickDiv.
61
61
// This makes absolute values of timestamp diffs smaller,
62
62
// and so they are encoded in less number of bytes.
63
- // 64 is somewhat arbitrary (one tick is ~20ns on a 3GHz machine).
64
- traceTickDiv = 64
63
+ // 64 on x86 is somewhat arbitrary (one tick is ~20ns on a 3GHz machine).
64
+ // The suggested increment frequency for PowerPC's time base register is
65
+ // 512 MHz according to Power ISA v2.07 section 6.2, so we use 16 on ppc64
66
+ // and ppc64le.
67
+ // Tracing won't work reliably for architectures where cputicks is emulated
68
+ // by nanotime, so the value doesn't matter for those architectures.
69
+ traceTickDiv = 16 + 48 * (goarch_386 | goarch_amd64 | goarch_amd64p32 )
65
70
// Maximum number of PCs in a single stack trace.
66
71
// Since events contain only stack id rather than whole stack trace,
67
72
// we can allow quite large values here.
You can’t perform that action at this time.
0 commit comments