Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169579
b: refs/heads/master
c: de89672
h: refs/heads/master
i:
  169577: 729e006
  169575: 147b0b3
v: v3
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Nov 11, 2009
1 parent 2120143 commit de94105
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 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: ca2b900f9af1586b9889ccc4b12e453c13268bd5
refs/heads/master: de8967214d8ce536161a1ad6538ad1cb82e7428d
11 changes: 10 additions & 1 deletion trunk/tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,13 +497,22 @@ static int __cmd_record(int argc, const char **argv)
if (target_pid == -1 && argc) {
pid = fork();
if (pid < 0)
perror("failed to fork");
die("failed to fork");

if (!pid) {
if (execvp(argv[0], (char **)argv)) {
perror(argv[0]);
exit(-1);
}
} else {
/*
* Wait a bit for the execv'ed child to appear
* and be updated in /proc
* FIXME: Do you know a less heuristical solution?
*/
usleep(1000);
event__synthesize_thread(pid,
process_synthesized_event);
}

child_pid = pid;
Expand Down

0 comments on commit de94105

Please sign in to comment.