diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-12-16 05:22:25 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-12-16 05:22:27 -0500 |
commit | 006b20fe4c69189b0d854e5eabf269e50ca86cdd (patch) | |
tree | 948b08825a36114c85ddc2bfcd965c261e32810f /tools/perf/builtin-record.c | |
parent | 5f29805a4f4627e766f862ff9f10c14f5f314359 (diff) | |
parent | d949750fed168b6553ca11ed19e4affd19d7a4d7 (diff) |
Merge branch 'perf/urgent' into perf/core
Merge reason: We want to apply a dependent patch.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r-- | tools/perf/builtin-record.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 699dd2149c4b..e9be6ae87a27 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -202,7 +202,7 @@ static void sig_atexit(void) | |||
202 | if (child_pid > 0) | 202 | if (child_pid > 0) |
203 | kill(child_pid, SIGTERM); | 203 | kill(child_pid, SIGTERM); |
204 | 204 | ||
205 | if (signr == -1) | 205 | if (signr == -1 || signr == SIGUSR1) |
206 | return; | 206 | return; |
207 | 207 | ||
208 | signal(signr, SIG_DFL); | 208 | signal(signr, SIG_DFL); |
@@ -535,6 +535,7 @@ static int __cmd_record(int argc, const char **argv) | |||
535 | atexit(sig_atexit); | 535 | atexit(sig_atexit); |
536 | signal(SIGCHLD, sig_handler); | 536 | signal(SIGCHLD, sig_handler); |
537 | signal(SIGINT, sig_handler); | 537 | signal(SIGINT, sig_handler); |
538 | signal(SIGUSR1, sig_handler); | ||
538 | 539 | ||
539 | if (forks && (pipe(child_ready_pipe) < 0 || pipe(go_pipe) < 0)) { | 540 | if (forks && (pipe(child_ready_pipe) < 0 || pipe(go_pipe) < 0)) { |
540 | perror("failed to create pipes"); | 541 | perror("failed to create pipes"); |
@@ -629,6 +630,7 @@ static int __cmd_record(int argc, const char **argv) | |||
629 | execvp(argv[0], (char **)argv); | 630 | execvp(argv[0], (char **)argv); |
630 | 631 | ||
631 | perror(argv[0]); | 632 | perror(argv[0]); |
633 | kill(getppid(), SIGUSR1); | ||
632 | exit(-1); | 634 | exit(-1); |
633 | } | 635 | } |
634 | 636 | ||
@@ -789,7 +791,7 @@ static int __cmd_record(int argc, const char **argv) | |||
789 | } | 791 | } |
790 | } | 792 | } |
791 | 793 | ||
792 | if (quiet) | 794 | if (quiet || signr == SIGUSR1) |
793 | return 0; | 795 | return 0; |
794 | 796 | ||
795 | fprintf(stderr, "[ perf record: Woken up %ld times to write data ]\n", waking); | 797 | fprintf(stderr, "[ perf record: Woken up %ld times to write data ]\n", waking); |