Lines Matching defs:trace
471 * the records to be ordered chronologically, and a small array to hold the pc's from the stack trace. A
481 void *z_pc[MAX_ZTRACE_DEPTH]; /* stack trace of caller */
592 /* Times a new alloc or trace is put into the hash table */
680 printf("Zone leak trace buckets override:%u\n", zleak_trace_buckets);
808 * (or just increments the refcount if the trace is already recorded)
810 * the associated trace's refcount is decremented.
811 * If the trace slot is in use, it returns.
830 struct ztrace* trace = &ztraces[trace_index];
833 trace->zt_hit_count++;
837 * has the same trace as us, just bail.
847 /* A size of zero indicates that the trace bucket is free. */
849 if (trace->zt_size > 0 && bcmp(trace->zt_stack, bt, (depth * sizeof(uintptr_t))) != 0 ) {
851 * Different unique trace with same hash!
852 * Just bail - if we're trying to record the leaker, hopefully the other trace will be deallocated
855 trace->zt_collisions++;
860 } else if (trace->zt_size > 0) {
861 /* Same trace, already added, so increment refcount */
862 trace->zt_size += allocation_size;
864 /* Found an unused trace bucket, record the trace here! */
865 if (trace->zt_depth != 0) /* if this slot was previously used but not currently in use */
869 trace->zt_size = allocation_size;
870 memcpy(trace->zt_stack, bt, (depth * sizeof(uintptr_t)) );
872 trace->zt_depth = depth;
873 trace->zt_collisions = 0;
901 if (top_ztrace->zt_size < trace->zt_size)
902 top_ztrace = trace;
930 struct ztrace *trace;
938 trace = &ztraces[allocation->za_trace_index];
940 /* size of 0 indicates trace bucket is unused */
941 if (trace->zt_size > 0) {
942 trace->zt_size -= allocation_size;