Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298315
b: refs/heads/master
c: 8f707d8
h: refs/heads/master
i:
  298313: 626af42
  298311: cd44ba1
v: v3
  • Loading branch information
Jiri Olsa authored and Arnaldo Carvalho de Melo committed Mar 16, 2012
1 parent cb5e53d commit 819d8e0
Show file tree
Hide file tree
Showing 10 changed files with 867 additions and 448 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: 89812fc81f8d62d70433a8ff63d26819f372e8ec
refs/heads/master: 8f707d843c2f4023490a873dbc182f632a3a5906
22 changes: 22 additions & 0 deletions trunk/tools/perf/builtin-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,24 @@ static int test__checkevent_symbolic_name(struct perf_evlist *evlist)
return 0;
}

static int test__checkevent_symbolic_name_config(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_HARDWARE == evsel->attr.type);
TEST_ASSERT_VAL("wrong config",
PERF_COUNT_HW_CPU_CYCLES == evsel->attr.config);
TEST_ASSERT_VAL("wrong period",
100000 == evsel->attr.sample_period);
TEST_ASSERT_VAL("wrong config1",
0 == evsel->attr.config1);
TEST_ASSERT_VAL("wrong config2",
1 == evsel->attr.config2);
return 0;
}

static int test__checkevent_symbolic_alias(struct perf_evlist *evlist)
{
struct perf_evsel *evsel = list_entry(evlist->entries.next,
Expand Down Expand Up @@ -883,6 +901,10 @@ static struct test__event_st {
.name = "instructions",
.check = test__checkevent_symbolic_name,
},
{
.name = "cycles/period=100000,config2/",
.check = test__checkevent_symbolic_name_config,
},
{
.name = "faults",
.check = test__checkevent_symbolic_alias,
Expand Down
Loading

0 comments on commit 819d8e0

Please sign in to comment.