x86, perf: P4 PMU -- configure predefined events
If an event is not RAW we should not exit p4_hw_config early but call x86_setup_perfctr as well. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Lin Ming <ming.m.lin@intel.com> Cc: Robert Richter <robert.richter@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Родитель
6e85158cf5
Коммит
de902d967f
|
@ -439,21 +439,20 @@ static int p4_hw_config(struct perf_event *event)
|
||||||
if (p4_ht_active() && p4_ht_thread(cpu))
|
if (p4_ht_active() && p4_ht_thread(cpu))
|
||||||
event->hw.config = p4_set_ht_bit(event->hw.config);
|
event->hw.config = p4_set_ht_bit(event->hw.config);
|
||||||
|
|
||||||
if (event->attr.type != PERF_TYPE_RAW)
|
if (event->attr.type == PERF_TYPE_RAW) {
|
||||||
return 0;
|
/*
|
||||||
|
* We don't control raw events so it's up to the caller
|
||||||
/*
|
* to pass sane values (and we don't count the thread number
|
||||||
* We don't control raw events so it's up to the caller
|
* on HT machine but allow HT-compatible specifics to be
|
||||||
* to pass sane values (and we don't count the thread number
|
* passed on)
|
||||||
* on HT machine but allow HT-compatible specifics to be
|
*
|
||||||
* passed on)
|
* XXX: HT wide things should check perf_paranoid_cpu() &&
|
||||||
*
|
* CAP_SYS_ADMIN
|
||||||
* XXX: HT wide things should check perf_paranoid_cpu() &&
|
*/
|
||||||
* CAP_SYS_ADMIN
|
event->hw.config |= event->attr.config &
|
||||||
*/
|
(p4_config_pack_escr(P4_ESCR_MASK_HT) |
|
||||||
event->hw.config |= event->attr.config &
|
p4_config_pack_cccr(P4_CCCR_MASK_HT));
|
||||||
(p4_config_pack_escr(P4_ESCR_MASK_HT) |
|
}
|
||||||
p4_config_pack_cccr(P4_CCCR_MASK_HT));
|
|
||||||
|
|
||||||
return x86_setup_perfctr(event);
|
return x86_setup_perfctr(event);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче