Merge branch 'perf/hw_breakpoints' into perf/core
The new hw_breakpoint bits are now ready for v3.20, merge them into the main branch, to avoid conflicts. Conflicts: tools/perf/Documentation/perf-record.txt Signed-off-by: Ingo Molnar <mingo@kernel.org>
这个提交包含在:
@@ -1145,6 +1145,49 @@ static int test__pinned_group(struct perf_evlist *evlist)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test__checkevent_breakpoint_len(struct perf_evlist *evlist)
|
||||
{
|
||||
struct perf_evsel *evsel = perf_evlist__first(evlist);
|
||||
|
||||
TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->nr_entries);
|
||||
TEST_ASSERT_VAL("wrong type", PERF_TYPE_BREAKPOINT == evsel->attr.type);
|
||||
TEST_ASSERT_VAL("wrong config", 0 == evsel->attr.config);
|
||||
TEST_ASSERT_VAL("wrong bp_type", (HW_BREAKPOINT_R | HW_BREAKPOINT_W) ==
|
||||
evsel->attr.bp_type);
|
||||
TEST_ASSERT_VAL("wrong bp_len", HW_BREAKPOINT_LEN_1 ==
|
||||
evsel->attr.bp_len);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test__checkevent_breakpoint_len_w(struct perf_evlist *evlist)
|
||||
{
|
||||
struct perf_evsel *evsel = perf_evlist__first(evlist);
|
||||
|
||||
TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->nr_entries);
|
||||
TEST_ASSERT_VAL("wrong type", PERF_TYPE_BREAKPOINT == evsel->attr.type);
|
||||
TEST_ASSERT_VAL("wrong config", 0 == evsel->attr.config);
|
||||
TEST_ASSERT_VAL("wrong bp_type", HW_BREAKPOINT_W ==
|
||||
evsel->attr.bp_type);
|
||||
TEST_ASSERT_VAL("wrong bp_len", HW_BREAKPOINT_LEN_2 ==
|
||||
evsel->attr.bp_len);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
test__checkevent_breakpoint_len_rw_modifier(struct perf_evlist *evlist)
|
||||
{
|
||||
struct perf_evsel *evsel = perf_evlist__first(evlist);
|
||||
|
||||
TEST_ASSERT_VAL("wrong exclude_user", !evsel->attr.exclude_user);
|
||||
TEST_ASSERT_VAL("wrong exclude_kernel", evsel->attr.exclude_kernel);
|
||||
TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv);
|
||||
TEST_ASSERT_VAL("wrong precise_ip", !evsel->attr.precise_ip);
|
||||
|
||||
return test__checkevent_breakpoint_rw(evlist);
|
||||
}
|
||||
|
||||
static int count_tracepoints(void)
|
||||
{
|
||||
char events_path[PATH_MAX];
|
||||
@@ -1420,6 +1463,21 @@ static struct evlist_test test__events[] = {
|
||||
.check = test__pinned_group,
|
||||
.id = 41,
|
||||
},
|
||||
{
|
||||
.name = "mem:0/1",
|
||||
.check = test__checkevent_breakpoint_len,
|
||||
.id = 42,
|
||||
},
|
||||
{
|
||||
.name = "mem:0/2:w",
|
||||
.check = test__checkevent_breakpoint_len_w,
|
||||
.id = 43,
|
||||
},
|
||||
{
|
||||
.name = "mem:0/4:rw:u",
|
||||
.check = test__checkevent_breakpoint_len_rw_modifier,
|
||||
.id = 44
|
||||
},
|
||||
#if defined(__s390x__)
|
||||
{
|
||||
.name = "kvm-s390:kvm_s390_create_vm",
|
||||
|
在新工单中引用
屏蔽一个用户