lkml.org 
[lkml]   [2010]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [RFC PATCH 2/3 v3] perf: Implement Nehalem uncore pmu
From
Date
On Thu, 2010-12-02 at 13:20 +0800, Lin Ming wrote:
> Changelogs of v3:
>
> - Allocate uncore data with kmalloc_node, like AMD NB stuff. (Peter
> Zijlstra)
>
> - per-task uncore event is not allowed. Simply set pmu::task_ctx_nr =
> perf_invalid_context. (Peter Zijlstra)

<snip>

> +
> +static struct pmu uncore_pmu = {
> + .event_init = uncore_pmu_event_init,
> + .add = uncore_pmu_add,
> + .del = uncore_pmu_del,
> + .start = uncore_pmu_start,
> + .stop = uncore_pmu_stop,
> + .read = uncore_pmu_read,
> +};

Sorry, I send out an old version, need below additional code to disallow
per-task uncore event.

diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index d2c10d8..d2a22ba 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -252,6 +252,8 @@ static void uncore_pmu_read(struct perf_event *event)
}

static struct pmu uncore_pmu = {
+ .task_ctx_nr = perf_invalid_context, /* per-task uncore event is not allowed */
+
.event_init = uncore_pmu_event_init,
.add = uncore_pmu_add,
.del = uncore_pmu_del,



\
 
 \ /
  Last update: 2010-12-02 06:57    [from the cache]
©2003-2011 Jasper Spaans