Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191204
b: refs/heads/master
c: c239da3
h: refs/heads/master
v: v3
  • Loading branch information
Tom Zanussi authored and Ingo Molnar committed Apr 14, 2010
1 parent 91115d9 commit cdac62a
Show file tree
Hide file tree
Showing 2 changed files with 12 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: 46656ac7fb3252f8a3db29b18638e0e8067849ba
refs/heads/master: c239da3b4b55dbb8f30bcb8d1a0d63fc44a567c3
12 changes: 11 additions & 1 deletion trunk/tools/perf/builtin-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,17 @@ static struct perf_event_ops event_ops = {
.comm = event__process_comm,
};

extern volatile int session_done;

static void sig_handler(int sig __unused)
{
session_done = 1;
}

static int __cmd_trace(struct perf_session *session)
{
signal(SIGINT, sig_handler);

return perf_session__process_events(session, &event_ops);
}

Expand Down Expand Up @@ -580,7 +589,8 @@ int cmd_trace(int argc, const char **argv, const char *prefix __used)
if (session == NULL)
return -ENOMEM;

if (!perf_session__has_traces(session, "record -R"))
if (strcmp(input_name, "-") &&
!perf_session__has_traces(session, "record -R"))
return -EINVAL;

if (generate_script_lang) {
Expand Down

0 comments on commit cdac62a

Please sign in to comment.