Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147612
b: refs/heads/master
c: 436224a
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jun 2, 2009
1 parent 97b2f30 commit 7d33844
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c70975bc8d5bac487616785f5d5bc7b090dfa2d9
refs/heads/master: 436224a6d8bb3e29fe0cc18122f8d1f593da67b8
13 changes: 13 additions & 0 deletions trunk/Documentation/perf_counter/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,17 @@ static size_t output__fprintf(FILE *fp, uint64_t total_samples)
return ret;
}

static void register_idle_thread(void)
{
struct thread *thread = threads__findnew(0);

if (thread == NULL ||
thread__set_comm(thread, "[idle]")) {
fprintf(stderr, "problem inserting idle task.\n");
exit(-1);
}
}


static int __cmd_report(void)
{
Expand All @@ -626,6 +637,8 @@ static int __cmd_report(void)
char cwd[PATH_MAX], *cwdp = cwd;
int cwdlen;

register_idle_thread();

input = open(input_name, O_RDONLY);
if (input < 0) {
perror("failed to open file");
Expand Down

0 comments on commit 7d33844

Please sign in to comment.