<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/perf/util/map.c, branch v3.0.82</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/tools/perf/util/map.c?h=v3.0.82</id>
<link rel='self' href='https://git.amat.us/linux/atom/tools/perf/util/map.c?h=v3.0.82'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-01-23T01:41:57Z</updated>
<entry>
<title>perf tools: Fix 64 bit integer format strings</title>
<updated>2011-01-23T01:41:57Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2011-01-22T22:37:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9486aa38771661e96fbb51c549b9901b5df609d8'/>
<id>urn:sha1:9486aa38771661e96fbb51c549b9901b5df609d8</id>
<content type='text'>
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 &lt;dkirjanov@kernel.org&gt;
Tested-by: Denis Kirjanov &lt;dkirjanov@kernel.org&gt;
LKML-Reference: &lt;20110120093246.GA8031@hera.kernel.org&gt;
Cc: Denis Kirjanov &lt;dkirjanov@kernel.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Pingtian Han &lt;phan@redhat.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Tom Zanussi &lt;tzanussi@gmail.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Don't keep unreferenced maps when unmaps are detected</title>
<updated>2010-08-02T22:45:23Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2010-08-02T22:45:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0a1eae391d0d92b60cff9f55cdaf3861b4e33922'/>
<id>urn:sha1:0a1eae391d0d92b60cff9f55cdaf3861b4e33922</id>
<content type='text'>
For a file with:

[root@emilia linux-2.6-tip]# perf report -D -fi allmodconfig-j32.perf.data | grep events:
     TOTAL events:      36933
      MMAP events:       9056
      LOST events:          0
      COMM events:       1702
      EXIT events:       1887
  THROTTLE events:          8
UNTHROTTLE events:          8
      FORK events:       1894
      READ events:          0
    SAMPLE events:      22378
      ATTR events:          0
EVENT_TYPE events:          0
TRACING_DATA events:          0
  BUILD_ID events:          0
[root@emilia linux-2.6-tip]#

Testing with valgrind and making perf_session__delete() a nop, so that
we can notice how many maps were actually deleted due to not having any
samples on it:

==== HEAP SUMMARY:

Before:

==10339==     in use at exit: 8,909,997 bytes in 68,690 blocks
==10339==   total heap usage: 78,696 allocs, 10,007 frees, 11,925,853 bytes allocated

After:

==10506==     in use at exit: 8,902,605 bytes in 68,606 blocks
==10506==   total heap usage: 78,696 allocs, 10,091 frees, 11,925,853 bytes allocated

I.e. just 84 detected unmaps with no hits out of 9056 for this workload,
not much, but in some other long running workload this may save more
bytes.

Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
LKML-Reference: &lt;new-submission&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf session: Free the ref_reloc_sym memory at the right place</title>
<updated>2010-08-02T21:18:28Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2010-08-02T21:18:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=076c6e45215aea0de1ed34d3d5079fabeaabf5e1'/>
<id>urn:sha1:076c6e45215aea0de1ed34d3d5079fabeaabf5e1</id>
<content type='text'>
Which is at perf_session__destroy_kernel_maps, counterpart to the
perf_session__create_kernel_maps where the kmap structure is located, just
after the vmlinux_maps.

Make it also check if the kernel maps were actually created, which may not
be the case if, for instance, perf_session__new can't complete due to
permission problems in, for instance, a 'perf report' case, when a
segfault will take place, that is how this was noticed.

The problem was introduced in d65a458, thus post .35.

This also adds code to release guest machines as them are also created
in perf_session__create_kernel_maps, so should be deleted on this newly
introduced counterpart, perf_session__destroy_kernel_maps.

Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
LKML-Reference: &lt;new-submission&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Release session and symbol resources on exit</title>
<updated>2010-07-30T21:31:28Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2010-07-30T21:31:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d65a458b348cd458413b3cfec66e43ebd0367646'/>
<id>urn:sha1:d65a458b348cd458413b3cfec66e43ebd0367646</id>
<content type='text'>
So that we reduce the noise when looking for leaks using tools such as
valgrind.

Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
LKML-Reference: &lt;new-submission&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Release thread resources on PERF_RECORD_EXIT</title>
<updated>2010-07-30T21:28:42Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2010-07-30T21:28:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=591765fdaf7ea1888157f342b67b0461f2e5ed9b'/>
<id>urn:sha1:591765fdaf7ea1888157f342b67b0461f2e5ed9b</id>
<content type='text'>
For long running sessions with many threads with short lifetimes the
amount of memory that the buildid process takes is too much.

Since we don't have hist_entries that may be pointing to them, we can
just release the resources associated with each thread when the exit
(PERF_RECORD_EXIT) event is received.

For normal processing we need to annotate maps with hits, and thus
hist_entries pointing to it and drop the ones that had none. Will be
done in a followup patch.

Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Tom Zanussi &lt;tzanussi@gmail.com&gt;
LKML-Reference: &lt;new-submission&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf report: Don't abbreviate file paths relative to the cwd</title>
<updated>2010-07-27T14:39:04Z</updated>
<author>
<name>Dave Martin</name>
<email>dave.martin@linaro.org</email>
</author>
<published>2010-07-27T15:40:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=361d13462585474267a0c41e956f1a1c19a93f17'/>
<id>urn:sha1:361d13462585474267a0c41e956f1a1c19a93f17</id>
<content type='text'>
This avoids around some problems where the full path is executables and DSOs it
needed for finding debug symbols on platforms with separated debug symbol files
such as Ubuntu.  This is simpler than tracking an extra name for each image.

The only impact should be that paths in verbose output from the perf tools
become absolute, instead of relative to .

LKML-Reference: &lt;new-submission&gt;
Signed-off-by: Dave Martin &lt;dave.martin@linaro.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf session: Embed the host machine data on perf_session</title>
<updated>2010-05-10T00:14:52Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2010-05-09T22:57:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1f626bc36847ac8dd192f055aed0f9678a781313'/>
<id>urn:sha1:1f626bc36847ac8dd192f055aed0f9678a781313</id>
<content type='text'>
We have just one host on a given session, and that is the most common
setup right now, so embed a -&gt;host_machine struct machine instance
directly in the perf_session class, check if we're looking for it before
going to the rb_tree.

This also fixes a problem found when we try to process old perf.data
files where we didn't have MMAP events for the kernel and modules and
thus don't create the kernel maps, do it in event__preprocess_sample if
it wasn't already.

Reported-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Frédéric Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Tom Zanussi &lt;tzanussi@gmail.com&gt;
Cc: Zhang, Yanmin &lt;yanmin_zhang@linux.intel.com&gt;
LKML-Reference: &lt;new-submission&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf machine: Adopt some map_groups functions</title>
<updated>2010-04-28T00:21:18Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2010-04-28T00:20:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d28c62232e50eab202bcd3f19b5c7a25b8b900b6'/>
<id>urn:sha1:d28c62232e50eab202bcd3f19b5c7a25b8b900b6</id>
<content type='text'>
Those functions operated on members now grouped in 'struct machine', so
move those methods to this new class.

The changes made to 'perf probe' shows that using this abstraction
inserting probes on guests almost got supported for free.

Cc: Avi Kivity &lt;avi@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: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Zhang, Yanmin &lt;yanmin_zhang@linux.intel.com&gt;
LKML-Reference: &lt;new-submission&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf machine: Pass buffer size to machine__mmap_name</title>
<updated>2010-04-28T00:19:05Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2010-04-28T00:19:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=48ea8f5470aa6f35244d1b218316705ea88c0259'/>
<id>urn:sha1:48ea8f5470aa6f35244d1b218316705ea88c0259</id>
<content type='text'>
Don't blindly assume that the size of the buffer is enough, use
snprintf.

Cc: Avi Kivity &lt;avi@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;
Cc: Zhang, Yanmin &lt;yanmin_zhang@linux.intel.com&gt;
LKML-Reference: &lt;new-submission&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Rename "kernel_info" to "machine"</title>
<updated>2010-04-28T00:17:50Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2010-04-28T00:17:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=23346f21b277e3aae5e9989e711a11cbe8133a45'/>
<id>urn:sha1:23346f21b277e3aae5e9989e711a11cbe8133a45</id>
<content type='text'>
struct kernel_info and kerninfo__ are too vague, what they really
describe are machines, virtual ones or hosts.

There are more changes to introduce helpers to shorten function calls
and to make more clear what is really being done, but I left that for
subsequent patches.

Cc: Avi Kivity &lt;avi@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;
Cc: Zhang, Yanmin &lt;yanmin_zhang@linux.intel.com&gt;
LKML-Reference: &lt;new-submission&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
