Skip to content
  1. Nov 02, 2011
    • Arnaldo Carvalho de Melo's avatar
      perf report: Add progress bar when processing time ordered events · 88660563
      Arnaldo Carvalho de Melo authored
      
      
      So that for large perf.data files the user can have visual feedback that
      activity is being performed.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-3ysn01mpspfrbsy56gznzqqz@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      88660563
    • Arnaldo Carvalho de Melo's avatar
      perf hists browser: Warn about lost events · 7b27509f
      Arnaldo Carvalho de Melo authored
      
      
      Just like the old perf top --tui and the --stdio version.
      
      But because we have the initial menu to choose which event to show in a
      session with multiple events we can see how many chunks were lost in
      each of the event types, clarifying which events are being affected the
      most.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-47yyqbubmjzch2chezmb21m6@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7b27509f
  2. Oct 28, 2011
  3. Oct 27, 2011
    • Arnaldo Carvalho de Melo's avatar
      perf hists: Fix recalculation of total_period when sorting entries · 7928631a
      Arnaldo Carvalho de Melo authored
      
      
      We were doing parts of it in hists__collapse_resort and parts of it in
      hists__output_resort, leading to a bogus total_period.
      
      Fix it by doing just the filtering operation when collapsing because
      there we know that the Zoom operations adds filters just  what is in
      hists->entries, not to the new batch of entries being collapsed.
      
      And move all the nr_entries + total_period recalculation to
      hists__output_resort since we will traverse all entries anyway there.
      
      Problem introduced when developing threaded addition of new batches
      of hist_entries, i.e. post v3.1.
      
      Reported-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-8xyh165h7hmwy0696hu25en6@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7928631a
  4. Oct 26, 2011
    • Arnaldo Carvalho de Melo's avatar
      perf header: Fix build on old systems · a9072bc0
      Arnaldo Carvalho de Melo authored
      
      
      For instance, on Fedora 8:
      
      CC /home/acme/git/build/perf/util/header.o
      cc1: warnings being treated as errors
      util/header.c: In function ‘write_cpudesc’:
      util/header.c:281: warning: implicit declaration of function ‘getline’
      util/header.c:281: warning: nested extern declaration of ‘getline’
      make: *** [/home/acme/git/build/perf/util/header.o] Error 1
      make: Leaving directory `/home/acme/git/linux/tools/perf'
      [acme@localhost linux]$
      
      This happens due to header ordering, in perf util.h sets _GNU_SOURCE, so
      it must come first.
      
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-alfra9wao63euguj7gr8jw7e@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a9072bc0
    • Arnaldo Carvalho de Melo's avatar
      perf ui browser: Handle K_RESIZE in dialog windows · 4610e413
      Arnaldo Carvalho de Melo authored
      
      
      Just provide wrappers for things like ui__warning, ui__dialog_yesno and
      if they return K_RESIZE, refresh dimensions, redraw the entries, etc.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-3ih7hyk9weryxaxb501sfq4u@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4610e413
    • Arnaldo Carvalho de Melo's avatar
      perf ui browser: No need to switch char sets that often · 0458122d
      Arnaldo Carvalho de Melo authored
      
      
      Just before and after the loop.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-0lh91cedngyg1pqarbky5vn7@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0458122d
    • Arnaldo Carvalho de Melo's avatar
      perf hists browser: Use K_TIMER · 13d8f96c
      Arnaldo Carvalho de Melo authored
      
      
      In the switch case entry for the timer routine.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-ypw3i9kmxoq28skx7jy914it@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      13d8f96c
    • Arnaldo Carvalho de Melo's avatar
      perf ui: Rename ui__warning_paranoid to ui__error_paranoid · b8631e6e
      Arnaldo Carvalho de Melo authored
      
      
      As it will exit the tool after the user is notified.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-vy06m8xzlvkhr8tk7nylhbng@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b8631e6e
    • Arnaldo Carvalho de Melo's avatar
      perf ui: Reimplement the popup windows using libslang · ae55795e
      Arnaldo Carvalho de Melo authored
      
      
      Just another step in stopping the use of libnewt in perf.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-vtxnmz1t1807ykprapnk9njl@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ae55795e
    • Arnaldo Carvalho de Melo's avatar
      perf ui: Reimplement ui__popup_menu using ui__browser · 1056d3dd
      Arnaldo Carvalho de Melo authored
      
      
      Right now let it work just like the other browsers: in full screen, at
      the top left corner. If people complain we can revisit, I found it OK
      and the laziest/quickest approach at reusing the ui_browser ;-)
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-4bgeqizcxh04q0sk24cw43gk@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1056d3dd
    • Arnaldo Carvalho de Melo's avatar
      perf ui: Reimplement ui_helpline using libslang · 2ba908ec
      Arnaldo Carvalho de Melo authored
      
      
      Just another step in stopping the use of libnewt in perf.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-gh7e1v2z7pzqmok02r6zvp17@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2ba908ec
    • Arnaldo Carvalho de Melo's avatar
      perf ui: Improve handling sigwinch a bit · 71172ed9
      Arnaldo Carvalho de Melo authored
      
      
      No need to unblock it at each ui__getch() and also allow other users to
      check if a resize is needed, or force an refresh of terminal dimensions.
      
      The 'force' one shouldn't be needed, but its in a slow path, so leave it
      like that for now, I'll revisit this another day.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-aujchu6yx3bfy64non1rky0w@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      71172ed9
    • Arnaldo Carvalho de Melo's avatar
      perf ui progress: Reimplement using slang · ca59bcbc
      Arnaldo Carvalho de Melo authored
      
      
      Just another step in stopping the use of libnewt in perf.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-vkb9jh5kkzl5ep3puoatd6an@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ca59bcbc
    • Arnaldo Carvalho de Melo's avatar
      perf evlist: Fix grouping of multiple events · 727ab04e
      Arnaldo Carvalho de Melo authored
      
      
      The __perf_evsel__open routing was grouping just the threads for that
      specific events per cpu when we want to group all threads in all events
      to the first fd opened on that cpu.
      
      So pass the xyarray with the first event, where the other events will be
      able to get that first per cpu fd.
      
      At some point top and record will switch to using perf_evlist__open that
      takes care of this detail and probably will also handle the fallback
      from hw to soft counters, etc.
      
      Reported-by: default avatarDeng-Cheng Zhu <dczhu@mips.com>
      Tested-by: default avatarDeng-Cheng Zhu <dczhu@mips.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-ebm34rh098i9y9v4cytfdp0x@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      727ab04e
  5. Oct 21, 2011
  6. Oct 20, 2011
    • Jiri Olsa's avatar
      perf tools: Fix tracing info recording · 29208e57
      Jiri Olsa authored
      
      
      Fixing the way the tracing information is stored within record command.
      The current implementation is causing issues for pipe output.
      
      Following commands fail currently:
      	perf script syscall-counts ls
      	perf record -e syscalls:sys_exit_read ls | ./perf report -i -
      
      The tracing information is part of the perf data file. It contains
      several files from within the tracing debugfs and procs directories.
      
      Beside some static header files, for each tracing event the format
      file is added. The /proc/kallsyms file is also added.
      
      The tracing data are stored with preceeding size. This is causing some
      dificulties for pipe output, since there's no way to tell debugfs/proc
      file size before reading it. So, for pipe output, all the debugfs files
      were read twice. Once to get the overall size and once to store the
      content itself. This can cause problem in case any of these file
      changed, within the storage time.
      
      To fix this behaviour and ensure the integrity of the tracing data, we:
          - read debugfs/proc file into the temp file
          - get temp file size and dump it to the pipe
          - dump the temp file contents to the pipe
      
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/20111020135943.GD2092@jolsa.brq.redhat.com
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      29208e57
    • Arnaldo Carvalho de Melo's avatar
      perf hists browser: Elide DSO column when it is set to just one DSO, ditto for threads · cc02c921
      Arnaldo Carvalho de Melo authored
      
      
      And also no leed to show the [.] (level: k, . for userspace) when
      showing just one DSO.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-4h3f6ro5o7ebepjbssxf0dd3@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      cc02c921
    • Arnaldo Carvalho de Melo's avatar
      perf hists: Don't consider filtered entries when calculating column widths · d197fd5d
      Arnaldo Carvalho de Melo authored
      
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-rf01wktu1e3f3az32nry86vu@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d197fd5d
    • Arnaldo Carvalho de Melo's avatar
      perf hists: Don't decay total_period for filtered entries · c64550cf
      Arnaldo Carvalho de Melo authored
      
      
      Following the 'perf report' model we don't zap hist_entry instances from
      the rb tree, we just keep them with he->filtered set to a mask of the
      filters applied to it (thread, parent, DSO so far).
      
      In top we need to decay even filtered entries, but we better not touch
      total_period for them...
      
      Now everything seems to work when filters are applied on top as they
      worked in 'report', i.e. both dynamic and static hist entry browsing
      works with filters.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-yt4xsbq20u9x9ypuwwyw2kao@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c64550cf
    • Arnaldo Carvalho de Melo's avatar
      perf hists browser: Honour symbol_conf.show_{nr_samples,total_period} · 2cf9cebf
      Arnaldo Carvalho de Melo authored
      
      
      We lost that when we move it outside hist_entry__snprintf, but better
      leave it untangled of 'perf diff' stuff (pair_hist, etc).
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-qlhb6ictf5twykog6x344s0b@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2cf9cebf
  7. Oct 19, 2011
    • David Ahern's avatar
      perf hists browser: Do not exit on tab key with single event · e4419b8e
      David Ahern authored
      
      
      TUI help states for multiple event sessions the TAB/UNTAB keys are used
      to switch events. For single event sessions (e.g., the default) the tab
      key currently causes the tui to exit. Change that to do nothing since
      there is not no second event to switch to.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1319045867-12728-1-git-send-email-dsahern@gmail.com
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e4419b8e
    • Arnaldo Carvalho de Melo's avatar
      perf annotate browser: Don't change selection line when returning from callq · fe46e64c
      Arnaldo Carvalho de Melo authored
      
      
      When the user navigates to another annotation browser pressing -> on a
      'callq' line, on exit (<-) return to the originating 'callq' line.
      
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-z5vgver0jgevbiicfndqni5g@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      fe46e64c
    • David Ahern's avatar
      perf tools: handle endianness of feature bitmap · d327fa43
      David Ahern authored
      Feature bitmap is declared as an array of unsigned longs -- not good
      since its size can differ between the host that generated the data file
      and the host analyzing the file.
      
      We need to handle endianness, but we don't know the size of the unsigned
      long where the file was generated. Take a best guess at determining it:
      try 64-bit swap first (ie., file created on a 64-bit host), and check if
      the hostname feature bit is set (this feature bit is forced on as of
      fbe96f29
      
      ).  If the bit is not, undo the 64-bit swap and try a 32-bit
      swap. If the hostname bit is still not set (e.g., older data file), punt
      and fallback to the original behavior -- clearing all feature bits and
      setting buildid.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1318980841-12616-1-git-send-email-dsahern@gmail.com
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d327fa43
    • David Ahern's avatar
      perf tools: Add prelink suggestion to dso update message · e77b15bd
      David Ahern authored
      
      
      Following a prelink run mapped files for long running processes can show
      as deleted. The current message suggests restarting long running
      processes. Add to that a suggestion that prelink might be the cause.
      
      Old message:
      /lib64/libc-2.14.so was updated, restart the long running
       apps that use it!
      
      New message:
      /lib64/libc-2.14.so was updated (is prelink enabled?).
        Restart the long running apps that use it!
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1318985085-20776-1-git-send-email-dsahern@gmail.com
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e77b15bd
    • David Ahern's avatar
      perf script: Fix unknown feature comment · 51192de3
      David Ahern authored
      "perf script -v" emits:
      
      unknown feature 3, continuing...
      unknown feature 4, continuing...
      unknown feature 5, continuing...
      unknown feature 6, continuing...
      unknown feature 7, continuing...
      unknown feature 8, continuing...
      unknown feature 9, continuing...
      unknown feature 10, continuing...
      unknown feature 11, continuing...
      unknown feature 12, continuing...
      unknown feature 13, continuing...
      unknown feature 14, continuing...
      
      These are all new features added by fbe96f29
      
      . Update
      perf_file_section__process to know they are valid feature ids.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1318984464-20650-1-git-send-email-dsahern@gmail.com
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      51192de3
    • Arnaldo Carvalho de Melo's avatar
      perf hists browser: Apply the dso and thread filters when merging new batches · 90cf1fb5
      Arnaldo Carvalho de Melo authored
      
      
      Now that we dynamicly add entries on the timer we need to not only
      traverse all entries when the user zooms into threads and/or DSOs, but
      as well after that apply it to the new batches of hist entries in
      hists__collapse_resort.
      
      Reported-by: default avatarMike Galbraith <efault@gmx.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-zustn633c7hnrae94x6nld1p@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      90cf1fb5
    • Arnaldo Carvalho de Melo's avatar
      perf hists: Move the dso and thread filters from hist_browser · d7b76f09
      Arnaldo Carvalho de Melo authored
      
      
      Since with dynamic addition of new hist entries we need to apply those
      filters as we merge new batches of hist_entry instances, for instance in
      perf top.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-zjhhf8kh9w1buty9p10od6rz@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d7b76f09
    • Arnaldo Carvalho de Melo's avatar
      perf ui browser: Honour the xterm colors · 82e0af87
      Arnaldo Carvalho de Melo authored
      
      
      So slang after all _has_ a 'default' color, call me color blind. Change
      the default to it.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Link: http://lkml.kernel.org/n/tip-1dfxivxv0jhwldpds3v4zla2@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      82e0af87
    • Arnaldo Carvalho de Melo's avatar
      perf top tui: Give color hints just on the percentage, like on --stdio · 33f62b3f
      Arnaldo Carvalho de Melo authored
      
      
      And like it was in the old top.
      
      Another change so that the familiarity with the old visual is maintained.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-ypmyx9p0ah4byqaygrnb09x8@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      33f62b3f
    • Arnaldo Carvalho de Melo's avatar
      perf ui browser: Make the colors configurable and change the defaults · e039fc72
      Arnaldo Carvalho de Melo authored
      
      
      Just use as a starting point the "[colors]" section of
      tools/perf/Documentation/perfconfig.example.
      
      Changed the colors to be the ones in the old perf tool if used in a green on
      black xterm.
      
      The next patches should allow using the colors configured for the xterm.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-3vqmyerkaqltqolmnlehonew@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e039fc72
    • Arnaldo Carvalho de Melo's avatar
      perf tui: Remove unneeded call to newtCls on startup · cc6e7aa0
      Arnaldo Carvalho de Melo authored
      
      
      That was just filling the screen with blue, even if not a crash, not
      something pleasant nor useful ;-)
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-58znjqvan9b1mv5pojxboidg@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      cc6e7aa0
    • Arnaldo Carvalho de Melo's avatar
      perf hists: Don't format the percentage on hist_entry__snprintf · f1cf602c
      Arnaldo Carvalho de Melo authored
      
      
      We can't have color correctly set there because in libslang (and in a future
      GUI) the colors must be set on a separate function call, so move that part to a
      separate function and make the stdio fprintf function call it.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-jpgy42438ce9tgbqppm397lq@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f1cf602c
    • Arnaldo Carvalho de Melo's avatar
      perf ui browser: Allow initial use without navigation UI elements · c172f742
      Arnaldo Carvalho de Melo authored
      
      
      The selection and scroll bar are really needed only when the user starts
      navigating, before that it just provide distractions.
      
      This also brings the initial screen to look more like the stdio UI,
      which more people are used to.
      
      The new code is flexible enough that menu like browsers can opt out and
      start with those UI elements.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-jfgok30kkerpfw8wtcltgy6z@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c172f742
    • Arnaldo Carvalho de Melo's avatar
      perf tui: Catch signals to exit gracefully · 3f7247e0
      Arnaldo Carvalho de Melo authored
      
      
      Resetting the terminal to a sane state.
      
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-myu44ujofadcy3y6an2mk383@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3f7247e0
  8. Oct 18, 2011
    • Arnaldo Carvalho de Melo's avatar
      perf hists browser: Add missing hotkeys to the help window · 2d5646c0
      Arnaldo Carvalho de Melo authored
      
      
      The navigation keys were missing (UP, DOWN arrows, etc).
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-3pnln0bws5v0yoqwd3f020nx@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2d5646c0
    • Josh Stone's avatar
      x86, perf, kprobes: Make kprobes's twobyte_is_boostable volatile · db45bd90
      Josh Stone authored
      
      
      When compiling an i386_defconfig kernel with
      gcc-4.6.1-9.fc15.i686, I noticed a warning about the asm operand
      for test_bit in kprobes' can_boost. I discovered that this
      caused only the first long of twobyte_is_boostable[] to be
      output.
      
      Jakub filed and fixed gcc PR50571 to correct the warning and
      this output issue.  But to solve it for less current gcc, we can
      make kprobes' twobyte_is_boostable[] volatile, and it won't be
      optimized out.
      
      Before:
      
          CC      arch/x86/kernel/kprobes.o
        In file included from include/linux/bitops.h:22:0,
                         from include/linux/kernel.h:17,
                         from [...]/arch/x86/include/asm/percpu.h:44,
                         from [...]/arch/x86/include/asm/current.h:5,
                         from [...]/arch/x86/include/asm/processor.h:15,
                         from [...]/arch/x86/include/asm/atomic.h:6,
                         from include/linux/atomic.h:4,
                         from include/linux/mutex.h:18,
                         from include/linux/notifier.h:13,
                         from include/linux/kprobes.h:34,
                         from arch/x86/kernel/kprobes.c:43:
        [...]/arch/x86/include/asm/bitops.h: In function ‘can_boost.part.1’:
        [...]/arch/x86/include/asm/bitops.h:319:2: warning: use of memory input without lvalue in asm operand 1 is deprecated [enabled by default]
      
        $ objdump -rd arch/x86/kernel/kprobes.o | grep -A1 -w bt
             551:	0f a3 05 00 00 00 00 	bt     %eax,0x0
                                554: R_386_32	.rodata.cst4
      
        $ objdump -s -j .rodata.cst4 -j .data arch/x86/kernel/kprobes.o
      
        arch/x86/kernel/kprobes.o:     file format elf32-i386
      
        Contents of section .data:
         0000 48000000 00000000 00000000 00000000  H...............
        Contents of section .rodata.cst4:
         0000 4c030000                             L...
      
      Only a single long of twobyte_is_boostable[] is in the object
      file.
      
      After, with volatile:
      
        $ objdump -rd arch/x86/kernel/kprobes.o | grep -A1 -w bt
             551:	0f a3 05 20 00 00 00 	bt     %eax,0x20
                                554: R_386_32	.data
      
        $ objdump -s -j .rodata.cst4 -j .data arch/x86/kernel/kprobes.o
      
        arch/x86/kernel/kprobes.o:     file format elf32-i386
      
        Contents of section .data:
         0000 48000000 00000000 00000000 00000000  H...............
         0010 00000000 00000000 00000000 00000000  ................
         0020 4c030000 0f000200 ffff0000 ffcff0c0  L...............
         0030 0000ffff 3bbbfff8 03ff2ebb 26bb2e77  ....;.......&..w
      
      Now all 32 bytes are output into .data instead.
      
      Signed-off-by: default avatarJosh Stone <jistone@redhat.com>
      Acked-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Jakub Jelinek <jakub@redhat.com>
      Link: http://lkml.kernel.org/r/1318899645-4068-1-git-send-email-jistone@redhat.com
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      db45bd90
    • Ingo Molnar's avatar
      Merge branch 'tip/perf/core' of... · 47724df3
      Ingo Molnar authored
      Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/core
      47724df3