<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/perf/util/dso.h, branch linux-4.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.1.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.1.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-03-24T15:08:43Z</updated>
<entry>
<title>perf symbols: Save DSO loading errno to better report errors</title>
<updated>2015-03-24T15:08:43Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2015-03-24T14:49:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=18425f13a0890ac1e88a64276771c1ae10030b4a'/>
<id>urn:sha1:18425f13a0890ac1e88a64276771c1ae10030b4a</id>
<content type='text'>
Before, when some problem happened while trying to load the kernel
symtab, 'perf top' would show:

      ┌─Warning:───────────────────────────┐
      │The vmlinux file can't be used.     │
      │Kernel samples will not be resolved.│
      │                                    │
      │                                    │
      │Press any key...                    │
      └────────────────────────────────────┘

Now, it reports:

  # perf top --vmlinux /dev/null

      ┌─Warning:───────────────────────────────────────────┐
      │The /tmp/passwd file can't be used: Invalid ELF file│
      │Kernel samples will not be resolved.                │
      │                                                    │
      │                                                    │
      │Press any key...                                    │
      └────────────────────────────────────────────────────┘

This is possible because we now register the reason for not being able
to load the symtab in the dso-&gt;load_errno member, and provide a
dso__strerror_load() routine to format this error into a strerror like
string with a short reason for the error while loading.

That can be just forwarding the dso__strerror_load() call to
strerror_r(), or, for a separate errno range providing a custom message.

Reported-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Acked-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Don Zickus &lt;dzickus@redhat.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/n/tip-u5rb5uq63xqhkfb8uv2lxd5u@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Remove is_kmodule_extension function</title>
<updated>2015-03-23T15:40:15Z</updated>
<author>
<name>Jiri Olsa</name>
</author>
<published>2015-02-12T21:49:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=907fb509f0f1e35848d9e20b00176319af79101c'/>
<id>urn:sha1:907fb509f0f1e35848d9e20b00176319af79101c</id>
<content type='text'>
Because it's no longer needed.

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Corey Ashford &lt;cjashfor@linux.vnet.ibm.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/n/tip-bb84vlg76t78q8y8fdeed2qn@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Remove compressed argument from is_kernel_module</title>
<updated>2015-03-23T15:39:30Z</updated>
<author>
<name>Jiri Olsa</name>
</author>
<published>2015-02-12T21:16:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e746b3ea0d414b3382bb61c8cecc45cefb370fbf'/>
<id>urn:sha1:e746b3ea0d414b3382bb61c8cecc45cefb370fbf</id>
<content type='text'>
We no longer need the 'compressed' argument, because all
current users use 'NULL' for it.

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Corey Ashford &lt;cjashfor@linux.vnet.ibm.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/n/tip-d72q2s7ggbmy2yzhumux4zzw@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Add dsos__addnew function</title>
<updated>2015-03-21T17:53:42Z</updated>
<author>
<name>Jiri Olsa</name>
</author>
<published>2015-02-12T21:06:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=701d8d7f861ec36f3bc60d1ddb185cceb7919c79'/>
<id>urn:sha1:701d8d7f861ec36f3bc60d1ddb185cceb7919c79</id>
<content type='text'>
Separate the creation of new dso object and its addition to the dsos
list. It will be used in following patch.

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Corey Ashford &lt;cjashfor@linux.vnet.ibm.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/n/tip-8j43jod97fdt5dwdsushwwae@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Add kmod_path__parse function</title>
<updated>2015-03-21T17:53:41Z</updated>
<author>
<name>Jiri Olsa</name>
</author>
<published>2015-02-05T14:40:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c8a67f50a1e68b912d1d74db6b455cac54ec4b4'/>
<id>urn:sha1:3c8a67f50a1e68b912d1d74db6b455cac54ec4b4</id>
<content type='text'>
Provides united way of parsing kernel module path
into several components.

The new kmod_path__parse function and few defines:

  int __kmod_path__parse(struct kmod_path *m, const char *path,
                         bool alloc_name, bool alloc_ext);

  #define kmod_path__parse(__m, __p)      __kmod_path__parse(__m, __p, false, false)
  #define kmod_path__parse_name(__m, __p) __kmod_path__parse(__m, __p, true , false)
  #define kmod_path__parse_ext(__m, __p)  __kmod_path__parse(__m, __p, false, true)

parse kernel module @path and updates @m argument like:

  @comp - true if @path contains supported compression suffix,
          false otherwise
  @kmod - true if @path contains '.ko' suffix in right position,
          false otherwise
  @name - if (@alloc_name &amp;&amp; @kmod) is true, it contains strdup-ed base name
          of the kernel module without suffixes, otherwise strudup-ed
          base name of @path
  @ext  - if (@alloc_ext &amp;&amp; @comp) is true, it contains strdup-ed string
          the compression suffix

It returns 0 if there's no strdup error, -ENOMEM otherwise.

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Corey Ashford &lt;cjashfor@linux.vnet.ibm.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/n/tip-9t6eqg8j610r94l743hkntiv@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf callchain: Separate eh/debug frame offset cache.</title>
<updated>2015-03-19T16:53:27Z</updated>
<author>
<name>Wang Nan</name>
</author>
<published>2015-03-13T07:02:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=303cb89a6d708da9c24f6f3390ff68a2bd822a13'/>
<id>urn:sha1:303cb89a6d708da9c24f6f3390ff68a2bd822a13</id>
<content type='text'>
Commit f1f13af99a90 ("perf callchain: Cache eh/debug frame offset for
dwarf unwind") introduces a cache for .debug_frame and .eh_frame_hdr.
Unfortunately, it makes them share a same cache (dso-&gt;frame_offset).
Which causes unwind failure on ARM:

   $ perf test unwind
  Test dwarf unwind: FAILED!

The reason is that, if a dso has '.debug_frame' but doesn't have
'.eh_frame_hdr' (like ARM), dso-&gt;frame_offset will be filled by offset
of '.debug_frame' during the first time calling of find_proc_info() -&gt;
read_unwind_spec_debug_frame(), and be regarded to '.eh_frame_hdr' when
the second time calling of find_proc_info() -&gt;
read_unwind_spec_eh_frame(), since '.eh_frame_hdr' is checked prior to
'.debug_frame'.

This patch solves the problem by creating two cache fields for
'.eh_frame_hdr' and '.debug_frame'.

Signed-off-by: Wang Nan &lt;wangnan0@huawei.com&gt;
Acked-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Li Zefan &lt;lizefan@huawei.com&gt;
Link: http://lkml.kernel.org/r/55028BA0.1030701@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf callchain: Cache eh/debug frame offset for dwarf unwind</title>
<updated>2015-01-29T19:20:42Z</updated>
<author>
<name>Namhyung Kim</name>
</author>
<published>2015-01-29T08:07:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f1f13af99a903ae873f5373e965508e0486c1c29'/>
<id>urn:sha1:f1f13af99a903ae873f5373e965508e0486c1c29</id>
<content type='text'>
When libunwind tries to resolve callchains it needs to know the offset
of .eh_frame_hdr or .debug_frame to access the dso.

Since it will always return the same result for a given DSO, just cache
the result as an optimization.

Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/r/1422518843-25818-41-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf symbols: Preparation for compressed kernel module support</title>
<updated>2014-11-04T13:15:53Z</updated>
<author>
<name>Namhyung Kim</name>
</author>
<published>2014-11-04T01:14:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c00c48fc6e6ef63d83a7417923a06b08089bb34b'/>
<id>urn:sha1:c00c48fc6e6ef63d83a7417923a06b08089bb34b</id>
<content type='text'>
This patch adds basic support to handle compressed kernel module as some
distro (such as Archlinux) carries on it now.  The actual work using
compression library will be added later.

Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Acked-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung.kim@lge.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/r/1415063674-17206-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Add facility to export data in database-friendly way</title>
<updated>2014-10-29T12:32:49Z</updated>
<author>
<name>Adrian Hunter</name>
</author>
<published>2014-10-23T10:45:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0db15b1e84a59e6e1da5fe6e74c35fe52fa29d92'/>
<id>urn:sha1:0db15b1e84a59e6e1da5fe6e74c35fe52fa29d92</id>
<content type='text'>
This patch introduces an abstraction for exporting sample data in a
database-friendly way.  The abstraction does not implement the actual
output.  A subsequent patch takes this facility into use for extending
the script interface.

The abstraction is needed because static data like symbols, dsos, comms
etc need to be exported only once.  That means allocating them a unique
identifier and recording it on each structure.  The member 'db_id' is
used for that.  'db_id' is just a 64-bit sequence number.

Exporting centres around the db_export__sample() function which exports
the associated data structures if they have not yet been allocated a
db_id.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@gmail.com&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;
Link: http://lkml.kernel.org/r/1414061124-26830-6-git-send-email-adrian.hunter@intel.com
[ committer note: Stash db_id using symbol_conf.priv_size + symbol__priv() and foo-&gt;priv areas ]
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools powerpc: Cache the DWARF debug info</title>
<updated>2014-10-29T12:32:46Z</updated>
<author>
<name>Sukadev Bhattiprolu</name>
</author>
<published>2014-10-22T00:09:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7d073b335edc8d97af730c2e3b83ed6642bd3c27'/>
<id>urn:sha1:7d073b335edc8d97af730c2e3b83ed6642bd3c27</id>
<content type='text'>
Cache the DWARF debug info for DSO so we don't have to rebuild it for each
address in the DSO.

Note that dso__new() uses calloc() so don't need to set dso-&gt;dwfl to NULL.

	$ /tmp/perf.orig --version
	perf version 3.18.rc1.gc2661b8
	$ /tmp/perf.new --version
	perf version 3.18.rc1.g402d62
	$ perf stat -e cycles,instructions /tmp/perf.orig report -g &gt; orig

	 Performance counter stats for '/tmp/perf.orig report -g':

	     6,428,177,183 cycles                    #    0.000 GHz
	     4,176,288,391 instructions              #    0.65  insns per cycle

	       1.840666132 seconds time elapsed

	$ perf stat -e cycles,instructions /tmp/perf.new report -g &gt; new

	 Performance counter stats for '/tmp/perf.new report -g':

	       305,773,142 cycles                    #    0.000 GHz
	       276,048,272 instructions              #    0.90  insns per cycle

	       0.087693543 seconds time elapsed
	$ diff orig new
	$

Changelog[v2]:

[Arnaldo Carvalho] Cache in existing global objects rather than create
                   new static/globals in functions.

Reported-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Sukadev Bhattiprolu &lt;sukadev@linux.vnet.ibm.com&gt;
Cc: Anton Blanchard &lt;anton@au1.ibm.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: http://lkml.kernel.org/r/20141022000958.GB2228@us.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
