]> Git Repo - linux.git/commitdiff
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorIngo Molnar <[email protected]>
Wed, 25 Jun 2014 05:42:24 +0000 (07:42 +0200)
committerIngo Molnar <[email protected]>
Wed, 25 Jun 2014 05:42:24 +0000 (07:42 +0200)
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

User visible changes:

  * Add --repeat global option to 'perf bench' to be used in benchmarks
    such as the existing 'futex' one, that was modified to use it instead
    of a local option. (Davidlohr Bueso)

  * Fix fd -> pathname resolution in 'trace', be it using /proc or
    a vfs_getname probe point. (Arnaldo Carvalho de Melo)

  * Add suggestion of how to set perf_event_paranoid sysctl, to help
    non-root users trying tools like 'trace' to get a working environment.
    (Arnaldo Carvalho de Melo)

Fixes:

  * Fix memory leak in the 'sched-messaging' perf bench test. (Davidlohr Bueso)

  * The -o and -n 'perf bench mem' options are mutually exclusive, emit error
    when both are specified. (Davidlohr Bueso)

  * Fix scrollbar refresh row index in the ui browser, problem exposed now
    that headers will be added and will be allowed to be switched on/off.
    (Jiri Olsa)

Cleanups:

  * Remove needless reassignments in 'trace' (Arnaldo Carvalho de Melo)

  * Cache the is_exit syscall test in 'trace) (Arnaldo Carvalho de Melo)

  * No need to reimplement err() in 'perf bench sched-messaging', drop barf().
    (Davidlohr Bueso).

  * Remove ev_name argument from perf_evsel__hists_browse, can be obtained
    from the other parameters. (Jiri Olsa)

Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
1  2 
tools/perf/ui/browsers/hists.c

index 04a229aa5c0fd0a5eb25b6cbdece82bdb0b9ba38,1bd35e8ed9f12f7cf94570a4676af43ef13ca204..2185091c5227abfc5834003f7878c074e4c42342
@@@ -17,7 -17,6 +17,7 @@@
  #include "../util.h"
  #include "../ui.h"
  #include "map.h"
 +#include "annotate.h"
  
  struct hist_browser {
        struct ui_browser   b;
@@@ -33,8 -32,7 +33,7 @@@
  
  extern void hist_browser__init_hpp(void);
  
- static int hists__browser_title(struct hists *hists, char *bf, size_t size,
-                               const char *ev_name);
+ static int hists__browser_title(struct hists *hists, char *bf, size_t size);
  static void hist_browser__update_nr_entries(struct hist_browser *hb);
  
  static struct rb_node *hists__filter_entries(struct rb_node *nd,
@@@ -346,7 -344,7 +345,7 @@@ static void ui_browser__warn_lost_event
                "Or reduce the sampling frequency.");
  }
  
- static int hist_browser__run(struct hist_browser *browser, const char *ev_name,
+ static int hist_browser__run(struct hist_browser *browser,
                             struct hist_browser_timer *hbt)
  {
        int key;
        browser->b.nr_entries = hist_browser__nr_entries(browser);
  
        hist_browser__refresh_dimensions(browser);
-       hists__browser_title(browser->hists, title, sizeof(title), ev_name);
+       hists__browser_title(browser->hists, title, sizeof(title));
  
        if (ui_browser__show(&browser->b, title,
                             "Press '?' for help on key bindings") < 0)
                                ui_browser__warn_lost_events(&browser->b);
                        }
  
-                       hists__browser_title(browser->hists, title, sizeof(title), ev_name);
+                       hists__browser_title(browser->hists, title, sizeof(title));
                        ui_browser__show_title(&browser->b, title);
                        continue;
                }
@@@ -1213,8 -1211,7 +1212,7 @@@ static struct thread *hist_browser__sel
        return browser->he_selection->thread;
  }
  
- static int hists__browser_title(struct hists *hists, char *bf, size_t size,
-                               const char *ev_name)
+ static int hists__browser_title(struct hists *hists, char *bf, size_t size)
  {
        char unit;
        int printed;
        unsigned long nr_samples = hists->stats.nr_events[PERF_RECORD_SAMPLE];
        u64 nr_events = hists->stats.total_period;
        struct perf_evsel *evsel = hists_to_evsel(hists);
+       const char *ev_name = perf_evsel__name(evsel);
        char buf[512];
        size_t buflen = sizeof(buf);
  
@@@ -1390,7 -1388,7 +1389,7 @@@ static void hist_browser__update_nr_ent
  }
  
  static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
-                                   const char *helpline, const char *ev_name,
+                                   const char *helpline,
                                    bool left_exits,
                                    struct hist_browser_timer *hbt,
                                    float min_pcnt,
  
                nr_options = 0;
  
-               key = hist_browser__run(browser, ev_name, hbt);
+               key = hist_browser__run(browser, hbt);
  
                if (browser->he_selection != NULL) {
                        thread = hist_browser__selected_thread(browser);
                                         bi->to.sym->name) > 0)
                                annotate_t = nr_options++;
                } else {
 -
                        if (browser->selection != NULL &&
                            browser->selection->sym != NULL &&
 -                          !browser->selection->map->dso->annotate_warned &&
 -                              asprintf(&options[nr_options], "Annotate %s",
 -                                       browser->selection->sym->name) > 0)
 -                              annotate = nr_options++;
 +                          !browser->selection->map->dso->annotate_warned) {
 +                              struct annotation *notes;
 +
 +                              notes = symbol__annotation(browser->selection->sym);
 +
 +                              if (notes->src &&
 +                                  asprintf(&options[nr_options], "Annotate %s",
 +                                               browser->selection->sym->name) > 0)
 +                                      annotate = nr_options++;
 +                      }
                }
  
                if (thread != NULL &&
@@@ -1662,7 -1655,6 +1661,7 @@@ retry_popup_menu
  
                if (choice == annotate || choice == annotate_t || choice == annotate_f) {
                        struct hist_entry *he;
 +                      struct annotation *notes;
                        int err;
  do_annotate:
                        if (!objdump_path && perf_session_env__lookup_objdump(env))
                                he->ms.map = he->branch_info->to.map;
                        }
  
 +                      notes = symbol__annotation(he->ms.sym);
 +                      if (!notes->src)
 +                              continue;
 +
                        /*
                         * Don't let this be freed, say, by hists__decay_entry.
                         */
@@@ -1843,7 -1831,7 +1842,7 @@@ static int perf_evsel_menu__run(struct 
  {
        struct perf_evlist *evlist = menu->b.priv;
        struct perf_evsel *pos;
-       const char *ev_name, *title = "Available samples";
+       const char *title = "Available samples";
        int delay_secs = hbt ? hbt->refresh : 0;
        int key;
  
@@@ -1876,9 -1864,8 +1875,8 @@@ browse_hists
                         */
                        if (hbt)
                                hbt->timer(hbt->arg);
-                       ev_name = perf_evsel__name(pos);
                        key = perf_evsel__hists_browse(pos, nr_events, help,
-                                                      ev_name, true, hbt,
+                                                      true, hbt,
                                                       menu->min_pcnt,
                                                       menu->env);
                        ui_browser__show_title(&menu->b, title);
@@@ -1982,10 -1969,9 +1980,9 @@@ int perf_evlist__tui_browse_hists(struc
  single_entry:
        if (nr_entries == 1) {
                struct perf_evsel *first = perf_evlist__first(evlist);
-               const char *ev_name = perf_evsel__name(first);
  
                return perf_evsel__hists_browse(first, nr_entries, help,
-                                               ev_name, false, hbt, min_pcnt,
+                                               false, hbt, min_pcnt,
                                                env);
        }
  
This page took 0.071139 seconds and 4 git commands to generate.