lkml.org 
[lkml]   [2011]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC PATCH 2/2] tools/perf: Make group_fd static and move its place in __perf_evsel__open()
    Date
    __perf_evsel__open() is called per event, it does not work for all the
    grouped events at one time. So, currently group_fd will alway be -1 for
    the events in a group. This patch fixes it.

    Signed-off-by: Deng-Cheng Zhu <dczhu@mips.com>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
    ---
    tools/perf/util/evsel.c | 3 +--
    1 files changed, 1 insertions(+), 2 deletions(-)

    diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
    index e389815..7bd0d9d 100644
    --- a/tools/perf/util/evsel.c
    +++ b/tools/perf/util/evsel.c
    @@ -219,9 +219,8 @@ static int __perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
    }

    for (cpu = 0; cpu < cpus->nr; cpu++) {
    - int group_fd = -1;
    -
    for (thread = 0; thread < threads->nr; thread++) {
    + static int group_fd = -1;

    if (!evsel->cgrp)
    pid = threads->map[thread];
    --
    1.7.1


    \
     
     \ /
      Last update: 2011-10-24 13:01    [W:0.019 / U:4.600 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site