Changeset 1e5cce6
- Timestamp:
- 05/29/15 02:50:36 (9 years ago)
- Branches:
- master
- Children:
- bdaf020
- Parents:
- 493cb97
- git-author:
- Hal Finkel <hfinkel@…> (05/29/15 02:50:36)
- git-committer:
- Hal Finkel <hfinkel@…> (05/29/15 02:50:36)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
memlog.c
r493cb97 r1e5cce6 63 63 } 64 64 65 static void print_context(const void *caller ) {65 static void print_context(const void *caller, int show_backtrace) { 66 66 struct rusage usage; 67 67 if (getrusage(RUSAGE_SELF, &usage)) { … … 72 72 fprintf(log_file, "\t%ld.%06ld %ld %ld", usage.ru_utime.tv_sec, 73 73 usage.ru_utime.tv_usec, usage.ru_maxrss, syscall(SYS_gettid)); 74 75 if (!show_backtrace) 76 return; 74 77 75 78 void *pcs[1024]; … … 141 144 142 145 fprintf(log_file, "M: %zd %p", size, ptr); 143 print_context(caller );146 print_context(caller, 1); 144 147 fprintf(log_file, "\n"); 145 148 … … 156 159 157 160 fprintf(log_file, "F: %p", ptr); 158 print_context(caller );161 print_context(caller, 0); 159 162 fprintf(log_file, "\n"); 160 163
Note: See TracChangeset
for help on using the changeset viewer.