Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147535
b: refs/heads/master
c: f49515b
h: refs/heads/master
i:
  147533: 164f394
  147531: e13139e
  147527: f0a7583
  147519: 07e3d0f
v: v3
  • Loading branch information
Ingo Molnar committed May 26, 2009
1 parent 297488e commit f8db253
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3e70611460fe74ad32534fa9791774f6bbdd4159
refs/heads/master: f49515b157e2d3ca3633eb0664fc46c42f6cb37e
22 changes: 15 additions & 7 deletions trunk/Documentation/perf_counter/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ static int __cmd_report(void)
char *buf;
event_t *event;
int ret, rc = EXIT_FAILURE;
unsigned long total = 0, total_mmap = 0, total_comm = 0, total_unknown;
unsigned long total = 0, total_mmap = 0, total_comm = 0, total_unknown = 0;

input = open(input_name, O_RDONLY);
if (input < 0) {
Expand Down Expand Up @@ -699,8 +699,6 @@ static int __cmd_report(void)
goto done;
}

head += event->header.size;

if (event->header.misc & PERF_EVENT_MISC_OVERFLOW) {
char level;
int show = 0;
Expand All @@ -709,7 +707,9 @@ static int __cmd_report(void)
uint64_t ip = event->ip.ip;

if (dump_trace) {
fprintf(stderr, "PERF_EVENT (IP, %d): %d: %p\n",
fprintf(stderr, "%p [%p]: PERF_EVENT (IP, %d): %d: %p\n",
(void *)(offset + head),
(void *)(long)(event->header.size),
event->header.misc,
event->ip.pid,
(void *)event->ip.ip);
Expand Down Expand Up @@ -753,7 +753,9 @@ static int __cmd_report(void)
struct map *map = map__new(&event->mmap);

if (dump_trace) {
fprintf(stderr, "PERF_EVENT_MMAP: [%p(%p) @ %p]: %s\n",
fprintf(stderr, "%p [%p]: PERF_EVENT_MMAP: [%p(%p) @ %p]: %s\n",
(void *)(offset + head),
(void *)(long)(event->header.size),
(void *)event->mmap.start,
(void *)event->mmap.len,
(void *)event->mmap.pgoff,
Expand All @@ -771,7 +773,9 @@ static int __cmd_report(void)
struct thread *thread = threads__findnew(event->comm.pid);

if (dump_trace) {
fprintf(stderr, "PERF_EVENT_COMM: %s:%d\n",
fprintf(stderr, "%p [%p]: PERF_EVENT_COMM: %s:%d\n",
(void *)(offset + head),
(void *)(long)(event->header.size),
event->comm.comm, event->comm.pid);
}
if (thread == NULL ||
Expand All @@ -783,12 +787,16 @@ static int __cmd_report(void)
break;
}
default: {
fprintf(stderr, "skipping unknown header type: %d\n",
fprintf(stderr, "%p [%p]: skipping unknown header type: %d\n",
(void *)(offset + head),
(void *)(long)(event->header.size),
event->header.type);
total_unknown++;
}
}

head += event->header.size;

if (offset + head < stat.st_size)
goto more;

Expand Down

0 comments on commit f8db253

Please sign in to comment.