31 Jan, 2012
1 commit
-
When building on my Debian/mips system, util/util.c fails to build
because commit 1aed2671738785e8f5aea663a6fda91aa7ef59b5 (perf kvm: Do
guest-only counting by default) indirectly includes stdio.h before the
feature selection in util.h is done. This prevents _GNU_SOURCE in
util.h from enabling the declaration of getline(), from now second
inclusion of stdio.h, and the build is broken.There is another breakage in util/evsel.c caused by include ordering,
but I didn't fully track down the commit that caused it.The root cause of all this is an inconsistent definition of _GNU_SOURCE,
so I move the definition into the Makefile so that it is passed to all
invocations of the compiler and used uniformly for all system header
files. All other #define and #undef of _GNU_SOURCE are removed as they
cause conflicts with the definition passed to the compiler.All the features.h definitions (_LARGEFILE64_SOURCE _FILE_OFFSET_BITS=64
and _GNU_SOURCE) are needed by the python glue code too, so they are
moved to BASIC_CFLAGS, and the misleading comments about BASIC_CFLAGS
are removed.This gives me a clean build on x86_64 (fc12) and mips (Debian).
Cc: David Daney
Cc: Ingo Molnar
Cc: Joerg Roedel
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1326836461-11952-1-git-send-email-ddaney.cavm@gmail.com
Signed-off-by: David Daney
Signed-off-by: Arnaldo Carvalho de Melo
28 Nov, 2011
1 commit
-
Since symbol__alloc_hists need it, to avoid passing it around in many
functions have it in the symbol_conf struct.Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-cwv8ysvpywzjq4v3xtbd4zwv@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
02 Nov, 2011
1 commit
-
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
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-47yyqbubmjzch2chezmb21m6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
26 Oct, 2011
2 commits
-
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
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-3ih7hyk9weryxaxb501sfq4u@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
In the switch case entry for the timer routine.
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-ypw3i9kmxoq28skx7jy914it@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
21 Oct, 2011
2 commits
-
We don't allocate the histogram data structures for --sort lists without
"sym", so, just like was done for the menu, don't try to annotate when
'a' is pressed, just warn the user about it.Reported-by: David Ahern
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-27mjg02s2mbw8lfxqv7jpzec@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Just another step in stopping the use of libnewt in perf.
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-uy6s534uqxq8tenh6s3k8ocj@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
20 Oct, 2011
2 commits
-
And also no leed to show the [.] (level: k, . for userspace) when
showing just one DSO.Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-4h3f6ro5o7ebepjbssxf0dd3@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
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
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-qlhb6ictf5twykog6x344s0b@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
19 Oct, 2011
5 commits
-
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
Cc: Ingo Molnar
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1319045867-12728-1-git-send-email-dsahern@gmail.com
Signed-off-by: David Ahern
Signed-off-by: Arnaldo Carvalho de Melo -
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
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-zjhhf8kh9w1buty9p10od6rz@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
And like it was in the old top.
Another change so that the familiarity with the old visual is maintained.
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-ypmyx9p0ah4byqaygrnb09x8@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
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
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-jpgy42438ce9tgbqppm397lq@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
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
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-jfgok30kkerpfw8wtcltgy6z@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
18 Oct, 2011
1 commit
-
The navigation keys were missing (UP, DOWN arrows, etc).
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-3pnln0bws5v0yoqwd3f020nx@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
14 Oct, 2011
1 commit
-
With underlying dynamic data structures we need to invalidate pointers
to them after a timer, as that entry may have vanished (decayed in top,
for instance).I forgot about browser_ui->top. Fix it by resetting it to null after a
timer. The seek operation from SEEK_SET will then set it to a valid
entry because it starts from rb_first(&hists->entries).Reported-by: Ingo Molnar
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-2ssjm0ouh9tsz4dwkcu7c40n@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
13 Oct, 2011
4 commits
-
When using multiple events the 'top' and 'report' tools will first
present the user with a menu to choose the event to browse.After that the user can either press
[ committer note: the line above is for the compiler warning ]
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-ujxkbvj9vy8w6xe2op5m51tb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Users (hist_browser, etc) should just handle all keys, discarding the
ones they don't handle.Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-fjouann12v2k58t6vdd2wawb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
To do that we needed to stop using newtForm, as we don't want libnewt to
catch the xterm resize signal.Remove some more newt calls and instead use the underlying libslang
directly. In time tools/perf will use just libslang.Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-h1824yjiru5n2ivz4bseizwj@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Just let it there till the user exits the annotation browser.
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-nmaxuzreqhm5k10t2co5sk9a@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
12 Oct, 2011
1 commit
-
In browsers that access dynamic underlying data structures, like in the
hists browser and its hist_entry rb_tree, we need to revalidate any
reference to the underlying data structure, because they can have gone
away, decayed.This fixes a problem where after a while the top entries get behind the
top of the screen, i.e. the top_idx stays at 0, which means it is at the
first entry in the rb_tree when in fact it wasn't because the
browser->top didn't got revalidated after the timer ran and the
underlying data structure got updated.Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-mhje66qssdko24q67a2lhlho@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
08 Oct, 2011
4 commits
-
Previously the hist_browser dealt with a static tree of entries, now it
needs to update the nr_entries in the browser after the timer runs.A better solution will come when moving using another thread for the
collapse_resort, etc, but for now this is ok.Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-9eno2iq55sjr4iyo899buzaw@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
When requesting multiple events, say:
# perf top -e instructions -e cycles -e cache-misses
The first screen lets the user chose what to see first, then to switch
one can either use the left key to get back to the event menu or simply
use TAB to go the next and shift+TAB to go the prev.When using TAB/UNTAB the call to perf_evlist__set_selected(event) was
missing, fix it.Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-3xqqh3fwmt914gg43frey14y@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Removing all the entries that only apply to symbols from the menu.
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-7bap0cy2fxtorlj5hgsp48m1@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
I.e. when in the annotate TUI window, if Enter is pressed over an
assembly line with a 'callq' it will try to open another TUI window with
that symbol.This is just a proof of concept and works only on x86_64, more work is
needed to support kernel modules, userland, other arches, etc, but
should already be useful as-is.Suggested-by: Ingo Molnar
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-opyvskw5na3qdmkv8vxi3zbr@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
07 Oct, 2011
1 commit
-
This allows passing a timer to be run periodically, which will update
the hists tree that then gers refreshed on the screen, just like the
Live mode (symbol entries, annotation) we already have in 'perf top
--tui'.Will be used by the new hist_entry/hists based 'top' tool.
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-2r44qd8oe4sagzcgoikl8qzc@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
15 Apr, 2011
1 commit
-
In hists browser, press hotkey 'a' to annotate current symbol.
Now it causes segment fault if 'a' is pressed on a null symbol.
Here are 2 small bugs:
- In perf_evsel__hists_browse, the condition check after 'a' is pressed
is not correct, we should check ->sym instead of ->map.
- In symbol__tui_annotate we must check whether sym is NULL or not
before getting annotation structure.This patch fixes above 2 small bugs.
Link: http://lkml.kernel.org/r/1302244286.4106.36.camel@minggr.sh.intel.com
Signed-off-by: Lin Ming
Signed-off-by: Arnaldo Carvalho de Melo
07 Mar, 2011
3 commits
-
When multiple events were used in 'perf record', allow the user to
choose which one is wanted before showing the per event histograms.Annotations will be performed on the chosen event.
Allow going back and forth from event to event quickly using just the
arrow keys and enter.Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
Cc: William Cohen
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
By creating an perf_evlist out of the attributes in the perf.data file
header, so that we can use evlists and evsels when reading recorded
sessions in addition to when we record sessions.More work is needed to allow tools to allow the user to select which
events are wanted when browsing sessions, be it just one or a subset of
them, aggregated or showed at the same time but with different
indications on the UI to allow seeing workloads thru different views at
the same time.But the overall goal/trend is to more uniformly use evsels and evlists.
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo
06 Mar, 2011
1 commit
-
TAB/UNTAB were not hotkeys, so didn't exit hists__browse back to
hists__tui_browse_tree, allowing just the first event to be browsed.Reported-by: William Cohen
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
Cc: William Cohen
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo
23 Feb, 2011
1 commit
-
In both --tui and --stdio, in 'annotate', 'top', 'report' when trying to
annotate a kernel symbol having just access to a kallsyms file, that
doesn't have the DWARF info needed for annotation.Suggested-by: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo
05 Feb, 2011
1 commit
-
The perf annotate tool continues aggregating everything on just one
histograms, but to support the top model add support for one histogram
perf evsel in the evlist.Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo
23 Jan, 2011
2 commits
-
That makes the callchain API naming more consistent and
reduce potential naming clashes.Cc: Ingo Molnar
Cc: Paul Mackerras
Cc: Peter Zijlstra
LKML-Reference:
Signed-off-by: Frederic Weisbecker
Signed-off-by: Arnaldo Carvalho de Melo -
Using %L[uxd] has issues in some architectures, like on ppc64. Fix it
by making our 64 bit integers typedefs of stdint.h types and using
PRI[ux]64 like, for instance, git does.Reported by Denis Kirjanov that provided a patch for one case, I went
and changed all cases.Reported-by: Denis Kirjanov
Tested-by: Denis Kirjanov
LKML-Reference:
Cc: Denis Kirjanov
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Pingtian Han
Cc: Stephane Eranian
Cc: Tom Zanussi
Signed-off-by: Arnaldo Carvalho de Melo
13 Sep, 2010
1 commit
-
They are useless and take away precious columns and lines, so stop using
windows.One more step in removing newt code, that after all is not being useful
at all for the coalescing TUI model in perf.Suggested-by: Christoph Hellwig
Cc: Christoph Hellwig
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo
26 Aug, 2010
4 commits
-
When looking at a callchains enabled perf data file one can find it
tiresome to start with all callchains collapsed and then to have to go
one by one expanding them.So associate 'E' with "Expand all callchains" and 'C' with "Collapse all
callchains".This way now one can have the top level view and then switch to/from
having all callchains expanded.More work is needed to allow expanding just from one branch down to its
leaves.Reported-by: Christoph Hellwig
Cc: Christoph Hellwig
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Peter Zijlstra
Cc: Stephane Eranian
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
Not everytime we show the callchains, removing duplicated initialization
of this field.Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Peter Zijlstra
Cc: Stephane Eranian
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
Its way too stupid to use rb_first() for just caching if there are
children, use the cheaper RB_EMPTY_ROOT() instead.Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Peter Zijlstra
Cc: Stephane Eranian
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
It wasn't setting the ms.has_children for the hist_entry itself, just
for the callchainCc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Peter Zijlstra
Cc: Stephane Eranian
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo