Changeset 134408c
- Timestamp:
- 05/28/15 08:18:21 (10 years ago)
- Branches:
- master
- Children:
- 69850c8
- Parents:
- 0a0ef57
- git-author:
- Hal Finkel <hfinkel@…> (05/28/15 08:18:21)
- git-committer:
- Hal Finkel <hfinkel@…> (05/28/15 08:18:21)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
memlog.c
r0a0ef57 r134408c 8 8 #include <string.h> 9 9 10 #include <sys/syscall.h> 10 11 #include <sys/time.h> 11 12 #include <sys/resource.h> … … 54 55 } 55 56 56 fprintf(log_file, "\t%ld.%06ld %ld ", usage.ru_utime.tv_sec,57 usage.ru_utime.tv_usec, usage.ru_maxrss );57 fprintf(log_file, "\t%ld.%06ld %ld %ld", usage.ru_utime.tv_sec, 58 usage.ru_utime.tv_usec, usage.ru_maxrss, syscall(SYS_gettid)); 58 59 59 60 int r; … … 86 87 87 88 if ((r = unw_get_proc_info_by_ip(unw_local_addr_space, pc, &pip, NULL))) { 89 if (r == -UNW_ENOINFO) 90 break; // the cursor is now invalid; must break here. 91 88 92 fprintf(stderr, "unw_get_proc_info_by_ip failed: %s [%d]\n", 89 93 unw_strerror(r), r); … … 91 95 } 92 96 } else { 97 if (r == -UNW_ENOINFO) 98 break; // the cursor is now invalid; must break here. 99 93 100 fprintf(stderr, "unw_get_proc_info failed: %s [%d]\n", 94 101 unw_strerror(r), r); … … 109 116 } 110 117 111 if (r < 0 )118 if (r < 0 && r != -UNW_ENOINFO) 112 119 fprintf(stderr, "unw_step failed: %s [%d]\n", 113 120 unw_strerror(r), r);
Note: See TracChangeset
for help on using the changeset viewer.