Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299714
b: refs/heads/master
c: e7c72d8
h: refs/heads/master
v: v3
  • Loading branch information
Gleb Natapov authored and Arnaldo Carvalho de Melo committed Apr 17, 2012
1 parent 26e9446 commit 0e78c15
Show file tree
Hide file tree
Showing 3 changed files with 32 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: 6ffd7bdbf8516d691974d21098278af65d4817a5
refs/heads/master: e7c72d888dac2c81003401d663bd8abd68e7c5cd
30 changes: 30 additions & 0 deletions trunk/tools/perf/builtin-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,28 @@ static int test__checkevent_symbolic_name_modifier(struct perf_evlist *evlist)
return test__checkevent_symbolic_name(evlist);
}

static int test__checkevent_exclude_host_modifier(struct perf_evlist *evlist)
{
struct perf_evsel *evsel = list_entry(evlist->entries.next,
struct perf_evsel, node);

TEST_ASSERT_VAL("wrong exclude guest", !evsel->attr.exclude_guest);
TEST_ASSERT_VAL("wrong exclude host", evsel->attr.exclude_host);

return test__checkevent_symbolic_name(evlist);
}

static int test__checkevent_exclude_guest_modifier(struct perf_evlist *evlist)
{
struct perf_evsel *evsel = list_entry(evlist->entries.next,
struct perf_evsel, node);

TEST_ASSERT_VAL("wrong exclude guest", evsel->attr.exclude_guest);
TEST_ASSERT_VAL("wrong exclude host", !evsel->attr.exclude_host);

return test__checkevent_symbolic_name(evlist);
}

static int test__checkevent_symbolic_alias_modifier(struct perf_evlist *evlist)
{
struct perf_evsel *evsel = list_entry(evlist->entries.next,
Expand Down Expand Up @@ -1091,6 +1113,14 @@ static struct test__event_st {
.name = "r1,syscalls:sys_enter_open:k,1:1:hp",
.check = test__checkevent_list,
},
{
.name = "instructions:G",
.check = test__checkevent_exclude_host_modifier,
},
{
.name = "instructions:H",
.check = test__checkevent_exclude_guest_modifier,
},
};

#define TEST__EVENTS_CNT (sizeof(test__events) / sizeof(struct test__event_st))
Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/util/parse-events.l
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ num_dec [0-9]+
num_hex 0x[a-fA-F0-9]+
num_raw_hex [a-fA-F0-9]+
name [a-zA-Z_*?][a-zA-Z0-9_*?]*
modifier_event [ukhp]{1,5}
modifier_event [ukhpGH]{1,8}
modifier_bp [rwx]

%%
Expand Down

0 comments on commit 0e78c15

Please sign in to comment.