<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/perf/util/thread.h, branch linux-2.6.33.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.33.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.33.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2009-12-14T15:57:17Z</updated>
<entry>
<title>perf session: Move kmaps to perf_session</title>
<updated>2009-12-14T15:57:17Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2009-12-13T21:50:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4aa65636411ccb12f006a6ad593930655c445ff6'/>
<id>urn:sha1:4aa65636411ccb12f006a6ad593930655c445ff6</id>
<content type='text'>
There is still some more work to do to disentangle map creation
from DSO loading, but this happens only for the kernel, and for
the early adopters of perf diff, where this disentanglement
matters most, we'll be testing different kernels, so no problem
here.

Further clarification: right now we create the kernel maps for
the various modules and discontiguous kernel text maps when
loading the DSO, we should do it as a two step process, first
creating the maps, for multiple mappings with the same DSO
store, then doing the dso load just once, for the first hit on
one of the maps sharing this DSO backing store.

Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Frédéric Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
LKML-Reference: &lt;1260741029-4430-6-git-send-email-acme@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>perf session: Move the global threads list to perf_session</title>
<updated>2009-12-14T15:57:16Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2009-12-13T21:50:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b3165f414416a717f72a376720564012af5a2e01'/>
<id>urn:sha1:b3165f414416a717f72a376720564012af5a2e01</id>
<content type='text'>
So that we can process two perf.data files.

We still need to add a O_MMAP mode for perf_session so that we
can do all the mmap stuff in it.

Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Frédéric Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
LKML-Reference: &lt;1260741029-4430-5-git-send-email-acme@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>perf session: Register the idle thread in perf_session__process_events</title>
<updated>2009-12-14T15:57:15Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2009-12-13T21:50:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=13df45ca1c9a430d5f53862854070fcc324e015c'/>
<id>urn:sha1:13df45ca1c9a430d5f53862854070fcc324e015c</id>
<content type='text'>
No need for all tools to register it and then immediately call
perf_session__process_events.

Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Frédéric Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
LKML-Reference: &lt;1260741029-4430-3-git-send-email-acme@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>perf symbols: Allow lookups by symbol name too</title>
<updated>2009-12-12T06:42:11Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2009-12-11T20:50:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=79406cd789f745ac6aa9d597895f904a98a14007'/>
<id>urn:sha1:79406cd789f745ac6aa9d597895f904a98a14007</id>
<content type='text'>
Configurable via symbol_conf.sort_by_name, so that the cost of an
extra rb_node on all 'struct symbol' instances is not paid by tools
that only want to decode addresses.

How to use it:

	symbol_conf.sort_by_name = true;
	symbol_init(&amp;symbol_conf);

	struct map *map = map_groups__find_by_name(kmaps, MAP__VARIABLE, "[kernel.kallsyms]");

	if (map == NULL) {
		pr_err("couldn't find map!\n");
		kernel_maps__fprintf(stdout);
	} else {
		struct symbol *sym = map__find_symbol_by_name(map, sym_filter, NULL);
		if (sym == NULL)
			pr_err("couldn't find symbol %s!\n", sym_filter);
		else
			pr_info("symbol %s: %#Lx-%#Lx \n", sym_filter, sym-&gt;start, sym-&gt;end);
	}

Looking over the vmlinux/kallsyms is common enough that I'll add a
variable to the upcoming struct perf_session to avoid the need to
use map_groups__find_by_name to get the main vmlinux/kallsyms map.

The above example looks on the 'variable' symtab, but it is just
like that for the functions one.

Also the sort operation is done when we first use
map__find_symbol_by_name, in a lazy way.

Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Frédéric Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Masami Hiramatsu &lt;mhiramat@redhat.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
LKML-Reference: &lt;1260564622-12392-1-git-send-email-acme@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>perf symbols: Rename kthreads to kmaps, using another abstraction for it</title>
<updated>2009-12-12T06:42:09Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2009-12-11T16:50:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9958e1f0aee632c3665162c9c93cf8fde8006a94'/>
<id>urn:sha1:9958e1f0aee632c3665162c9c93cf8fde8006a94</id>
<content type='text'>
Using a struct thread instance just to hold the kernel space maps
(vmlinux + modules) is overkill and confuses people trying to
understand the perf symbols abstractions.

The kernel maps are really present in all threads, i.e. the kernel
is a library, not a separate thread.

So introduce the 'map_groups' abstraction and use it for the kernel
maps, now in the kmaps global variable.

It, in turn, will move, together with the threads list to the
perf_file abstraction, so that we can support multiple perf_file
instances, needed by perf diff.

Brainstormed-with: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Cc: Frédéric Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
LKML-Reference: &lt;1260550239-5372-1-git-send-email-acme@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>perf tools: Consolidate symbol resolving across all tools</title>
<updated>2009-11-27T19:22:02Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2009-11-27T18:29:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1ed091c45ae33b2179d387573c3fe3f3b4adf60a'/>
<id>urn:sha1:1ed091c45ae33b2179d387573c3fe3f3b4adf60a</id>
<content type='text'>
Now we have a very high level routine for simple tools to
process IP sample events:

	int event__preprocess_sample(const event_t *self,
				     struct addr_location *al,
				     symbol_filter_t filter)

It receives the event itself and will insert new threads in the
global threads list and resolve the map and symbol, filling all
this info into the new addr_location struct, so that tools like
annotate and report can further process the event by creating
hist_entries in their specific way (with or without callgraphs,
etc).

It in turn uses the new next layer function:

	void thread__find_addr_location(struct thread *self, u8 cpumode,
					enum map_type type, u64 addr,
					struct addr_location *al,
					symbol_filter_t filter)

This one will, given a thread (userspace or the kernel kthread
one), will find the given type (MAP__FUNCTION now, MAP__VARIABLE
too in the near future) at the given cpumode, taking vdsos into
account (userspace hit, but kernel symbol) and will fill all
these details in the addr_location given.

Tools that need a more compact API for plain function
resolution, like 'kmem', can use this other one:

	struct symbol *thread__find_function(struct thread *self, u64 addr,
					     symbol_filter_t filter)

So, to resolve a kernel symbol, that is all the 'kmem' tool
needs, its just a matter of calling:

	sym = thread__find_function(kthread, addr, NULL);

The 'filter' parameter is needed because we do lazy
parsing/loading of ELF symtabs or /proc/kallsyms.

With this we remove more code duplication all around, which is
always good, huh? :-)

Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Frédéric Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: John Kacur &lt;jkacur@redhat.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
LKML-Reference: &lt;1259346563-12568-12-git-send-email-acme@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>perf symbols: When not using modules, discard its symbols</title>
<updated>2009-11-27T19:22:01Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2009-11-27T18:29:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1de8e24520ffdcf2a90c842eed937f59079a2abd'/>
<id>urn:sha1:1de8e24520ffdcf2a90c842eed937f59079a2abd</id>
<content type='text'>
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Frédéric Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
LKML-Reference: &lt;1259346563-12568-10-git-send-email-acme@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>perf symbols: Support multiple symtabs in struct thread</title>
<updated>2009-11-27T19:22:00Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2009-11-27T18:29:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=95011c600740837288a3b34b411244a4d9157c4e'/>
<id>urn:sha1:95011c600740837288a3b34b411244a4d9157c4e</id>
<content type='text'>
Making the routines that were so far specific to the kernel maps
useful for all threads.

This is done by making the kernel maps be contained in a kernel
"thread".

This gets the kernel specific routines closer to the userspace
counterparts, which will help in reducing the boilerplate for
resolving a symbol, as will be demonstrated in the next patches.

Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Frédéric Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
LKML-Reference: &lt;1259346563-12568-9-git-send-email-acme@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>perf symbols: Kernel_maps should be an array of MAP__NR_TYPES entries</title>
<updated>2009-11-27T19:22:00Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2009-11-27T18:29:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=23ea4a3fadc6b1692dec935397ea15e2affc1cba'/>
<id>urn:sha1:23ea4a3fadc6b1692dec935397ea15e2affc1cba</id>
<content type='text'>
So that we can support multiple symbol table types.

Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Frédéric Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
LKML-Reference: &lt;1259346563-12568-8-git-send-email-acme@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>perf symbols: Rename find_symbol routines to find_function</title>
<updated>2009-11-24T15:37:03Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2009-11-24T15:01:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fcf1203a919c3a3d212c0ed01f5240fd592bf5ae'/>
<id>urn:sha1:fcf1203a919c3a3d212c0ed01f5240fd592bf5ae</id>
<content type='text'>
Paving the way for supporting variable in adition to function
symbols.

Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Frédéric Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
LKML-Reference: &lt;1259074912-5924-1-git-send-email-acme@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
</feed>
