Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298317
b: refs/heads/master
c: 5f537a2
h: refs/heads/master
i:
  298315: 819d8e0
v: v3
  • Loading branch information
Jiri Olsa authored and Arnaldo Carvalho de Melo committed Mar 16, 2012
1 parent 78f1706 commit 8a9fd01
Show file tree
Hide file tree
Showing 6 changed files with 173 additions and 101 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: cd82a32e9924d3a82bd27f830755d23e4ded25bc
refs/heads/master: 5f537a26590e696466aae7f41e6b77e92c8486d1
20 changes: 20 additions & 0 deletions trunk/tools/perf/builtin-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,22 @@ static int test__checkevent_genhw_modifier(struct perf_evlist *evlist)
return test__checkevent_genhw(evlist);
}

static int test__checkevent_pmu(struct perf_evlist *evlist)
{

struct perf_evsel *evsel = list_entry(evlist->entries.next,
struct perf_evsel, node);

TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->nr_entries);
TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->attr.type);
TEST_ASSERT_VAL("wrong config", 10 == evsel->attr.config);
TEST_ASSERT_VAL("wrong config1", 1 == evsel->attr.config1);
TEST_ASSERT_VAL("wrong config2", 3 == evsel->attr.config2);
TEST_ASSERT_VAL("wrong period", 1000 == evsel->attr.sample_period);

return 0;
}

static struct test__event_st {
const char *name;
__u32 type;
Expand Down Expand Up @@ -958,6 +974,10 @@ static struct test__event_st {
.name = "L1-dcache-load-miss:kp",
.check = test__checkevent_genhw_modifier,
},
{
.name = "cpu/config=10,config1,config2=3,period=1000/u",
.check = test__checkevent_pmu,
},
};

#define TEST__EVENTS_CNT (sizeof(test__events) / sizeof(struct test__event_st))
Expand Down
Loading

0 comments on commit 8a9fd01

Please sign in to comment.