Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156741
b: refs/heads/master
c: 3a9f131
h: refs/heads/master
i:
  156739: dbec462
v: v3
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Aug 13, 2009
1 parent e23ffb9 commit d5e1571
Show file tree
Hide file tree
Showing 3 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: 28402971d869e26271b25301011f667d3a5640c3
refs/heads/master: 3a9f131fb00b8ac5950a11ad1599e45edfb5ae44
2 changes: 1 addition & 1 deletion trunk/tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ static void create_counter(int counter, int cpu, pid_t pid)
PERF_FORMAT_TOTAL_TIME_RUNNING |
PERF_FORMAT_ID;

attr->sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TID;
attr->sample_type |= PERF_SAMPLE_IP | PERF_SAMPLE_TID;

if (freq) {
attr->sample_type |= PERF_SAMPLE_PERIOD;
Expand Down
10 changes: 10 additions & 0 deletions trunk/tools/perf/util/parse-events.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ static int parse_tracepoint_event(const char **strp,
struct perf_counter_attr *attr)
{
const char *evt_name;
char *flags;
char sys_name[MAX_EVENT_LENGTH];
char id_buf[4];
int fd;
Expand All @@ -400,6 +401,15 @@ static int parse_tracepoint_event(const char **strp,
strncpy(sys_name, *strp, sys_length);
sys_name[sys_length] = '\0';
evt_name = evt_name + 1;

flags = strchr(evt_name, ':');
if (flags) {
*flags = '\0';
flags++;
if (!strncmp(flags, "record", strlen(flags)))
attr->sample_type |= PERF_SAMPLE_RAW;
}

evt_length = strlen(evt_name);
if (evt_length >= MAX_EVENT_LENGTH)
return 0;
Expand Down

0 comments on commit d5e1571

Please sign in to comment.