lkml.org 
[lkml]   [2016]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 32/54] perf record: Use OPT_BOOLEAN_SET for buildid cache related options
    Date
    'perf record' knows whether buildid cache is enabled (via
    --no-no-buildid-cache) deliberately. Buildid cache can be turned off
    in some situations.

    Output switching support needs this feature to turn off buildid cache
    by default.

    Signed-off-by: Wang Nan <wangnan0@huawei.com>
    Signed-off-by: He Kuang <hekuang@huawei.com>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Zefan Li <lizefan@huawei.com>
    Cc: pi3orama@163.com
    ---
    tools/perf/builtin-record.c | 12 ++++++++----
    1 file changed, 8 insertions(+), 4 deletions(-)

    diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
    index dc7fb4d..c8d9c0b 100644
    --- a/tools/perf/builtin-record.c
    +++ b/tools/perf/builtin-record.c
    @@ -50,7 +50,9 @@ struct record {
    const char *progname;
    int realtime_prio;
    bool no_buildid;
    + bool no_buildid_set;
    bool no_buildid_cache;
    + bool no_buildid_cache_set;
    bool buildid_all;
    unsigned long long samples;
    };
    @@ -1180,10 +1182,12 @@ struct option __record_options[] = {
    OPT_BOOLEAN('P', "period", &record.opts.period, "Record the sample period"),
    OPT_BOOLEAN('n', "no-samples", &record.opts.no_samples,
    "don't sample"),
    - OPT_BOOLEAN('N', "no-buildid-cache", &record.no_buildid_cache,
    - "do not update the buildid cache"),
    - OPT_BOOLEAN('B', "no-buildid", &record.no_buildid,
    - "do not collect buildids in perf.data"),
    + OPT_BOOLEAN_SET('N', "no-buildid-cache", &record.no_buildid_cache,
    + &record.no_buildid_cache_set,
    + "do not update the buildid cache"),
    + OPT_BOOLEAN_SET('B', "no-buildid", &record.no_buildid,
    + &record.no_buildid_set,
    + "do not collect buildids in perf.data"),
    OPT_CALLBACK('G', "cgroup", &record.evlist, "name",
    "monitor event in cgroup name only",
    parse_cgroups),
    --
    1.8.3.4
    \
     
     \ /
      Last update: 2016-01-25 11:21    [W:4.054 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site