lkml.org 
[lkml]   [2018]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[tip:perf/urgent] perf top: Remove lost events checking
    Commit-ID:  a1ff5b05e988ca3620027148cd61013408ea4194
    Gitweb: https://git.kernel.org/tip/a1ff5b05e988ca3620027148cd61013408ea4194
    Author: Kan Liang <kan.liang@intel.com>
    AuthorDate: Thu, 18 Jan 2018 13:26:30 -0800
    Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
    CommitDate: Thu, 15 Feb 2018 09:56:43 -0300

    perf top: Remove lost events checking

    There would be some records lost in overwrite mode because of pausing
    the ringbuffer. It has little impact for the accuracy of the snapshot
    and could be tolerated by 'perf top'.

    Remove the lost events checking.

    Signed-off-by: Kan Liang <kan.liang@intel.com>
    Acked-by: Jiri Olsa <jolsa@kernel.org>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Jin Yao <yao.jin@linux.intel.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Wang Nan <wangnan0@huawei.com>
    Link: http://lkml.kernel.org/r/1516310792-208685-16-git-send-email-kan.liang@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    ---
    tools/perf/builtin-top.c | 8 +++++---
    1 file changed, 5 insertions(+), 3 deletions(-)

    diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
    index 7def861..5965306 100644
    --- a/tools/perf/builtin-top.c
    +++ b/tools/perf/builtin-top.c
    @@ -283,8 +283,9 @@ static void perf_top__print_sym_table(struct perf_top *top)

    printf("%-*.*s\n", win_width, win_width, graph_dotted_line);

    - if (hists->stats.nr_lost_warned !=
    - hists->stats.nr_events[PERF_RECORD_LOST]) {
    + if (!top->record_opts.overwrite &&
    + (hists->stats.nr_lost_warned !=
    + hists->stats.nr_events[PERF_RECORD_LOST])) {
    hists->stats.nr_lost_warned =
    hists->stats.nr_events[PERF_RECORD_LOST];
    color_fprintf(stdout, PERF_COLOR_RED,
    @@ -611,7 +612,8 @@ static void *display_thread_tui(void *arg)

    perf_evlist__tui_browse_hists(top->evlist, help, &hbt,
    top->min_percent,
    - &top->session->header.env, true);
    + &top->session->header.env,
    + !top->record_opts.overwrite);

    done = 1;
    return NULL;
    \
     
     \ /
      Last update: 2018-02-16 10:53    [W:4.079 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site