Lines Matching defs:trace
490 * Sample factor for how often to record a trace. This is overwritable
505 trace [1] trace [2] trace [3] trace [4] trace [5] \n\
510 trace [1] trace [2] trace [3] \
511 trace [4] trace [5] \n\
6512 * replace old allocation with new one if the trace slot is in use, return
6513 * (or increment refcount if same trace).
6519 struct mtrace *trace;
6531 trace = &mleak_traces[trace_index];
6534 VERIFY(trace <= &mleak_traces[mleak_trace_buckets - 1]);
6537 trace->hitcount++;
6541 * and the occupier has the same trace, just bail.
6552 * Size of zero = trace bucket is free.
6554 if (trace->allocs > 0 &&
6555 bcmp(trace->addr, bt, (depth * sizeof (uintptr_t))) != 0) {
6556 /* Different, unique trace, but the same hash! Bail out. */
6557 trace->collisions++;
6561 } else if (trace->allocs > 0) {
6562 /* Same trace, already added, so increment refcount */
6563 trace->allocs++;
6565 /* Found an unused trace bucket, so record the trace here */
6566 if (trace->depth != 0) {
6571 trace->allocs = 1;
6572 memcpy(trace->addr, bt, (depth * sizeof (uintptr_t)));
6573 trace->depth = depth;
6574 trace->collisions = 0;
6610 struct mtrace *trace;
6611 trace = &mleak_traces[allocation->trace_index];
6612 /* allocs = 0 means trace bucket is unused */
6613 if (trace->allocs > 0)
6614 trace->allocs--;
6615 if (trace->allocs == 0)
6616 trace->depth = 0;