1 //:build !alloc_trace
2 3 package runtime
4 5 // logAlloc is the untagged counterpart of the instrumented implementation in
6 // alloc_trace.mx. -print-allocs emits calls to it in every build, so the
7 // compiler does not need to know which runtime files a build selects; without
8 // the alloc_trace tag there is nothing to count and no tables to read.
9 func logAlloc(siteID int32, size uintptr) {
10 }
11 12 // PrintAllocCounters prints the per-site counts in an instrumented build.
13 // Without the alloc_trace tag there is nothing to print, but the function
14 // exists so a program can call it unconditionally.
15 func PrintAllocCounters() {
16 }
17