RE: [PATCH V3 11/12] perf top: switch default mode to overwrite mode
From: Liang, Kan
Date: Thu Jan 11 2018 - 16:30:57 EST
> On Thu, Dec 21, 2017 at 10:08:53AM -0800, kan.liang@xxxxxxxxx wrote:
>
> SNIP
>
> > .max_stack = sysctl_perf_event_max_stack,
> > .sym_pcnt_filter = 5,
> > diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
> > index 68146f4..56023e4 100644
> > --- a/tools/perf/ui/browsers/hists.c
> > +++ b/tools/perf/ui/browsers/hists.c
> > @@ -638,8 +638,13 @@ int hist_browser__run(struct hist_browser
> *browser, const char *help)
> > nr_entries = hist_browser__nr_entries(browser);
> > ui_browser__update_nr_entries(&browser->b,
> nr_entries);
> >
> > - if (browser->hists->stats.nr_lost_warned !=
> > - browser->hists-
> >stats.nr_events[PERF_RECORD_LOST]) {
> > + /*
> > + * Don't print lost events warning for perf top,
> > + * because it is overwrite mode.
> > + * Perf top is the only tool which has hbt timer.
> > + */
>
> I hate that warning, but still should it be ommited only for overwrite case?
> also please separate this change from the rest of the patch
>
OK. Will do it.
Thanks,
Kan
> jirka
>
> > + if ((browser->hists->stats.nr_lost_warned !=
> > + browser->hists-
> >stats.nr_events[PERF_RECORD_LOST]) && !hbt) {
> > browser->hists->stats.nr_lost_warned =
> > browser->hists-
> >stats.nr_events[PERF_RECORD_LOST];
> > ui_browser__warn_lost_events(&browser-
> >b);
> > @@ -3203,7 +3208,8 @@ static int perf_evsel_menu__run(struct
> perf_evsel_menu *menu,
> > case K_TIMER:
> > hbt->timer(hbt->arg);
> >
> > - if (!menu->lost_events_warned && menu-
> >lost_events) {
> > + if (!menu->lost_events_warned &&
> > + menu->lost_events && !hbt) {
> > ui_browser__warn_lost_events(&menu->b);
> > menu->lost_events_warned = true;
> > }
> > --
> > 2.5.5
> >