public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] perf script: fix duplicate symbols in db-export
@ 2016-05-11  3:26 Chris Phlipot
  2016-05-11  3:26 ` [PATCH v2 1/4] perf symbols: add dso__insert_symbol function Chris Phlipot
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Chris Phlipot @ 2016-05-11  3:26 UTC (permalink / raw)
  To: adrian.hunter, acme, peterz, mingo; +Cc: linux-kernel, Chris Phlipot

Changes since v1:
 - fixed scripts/checkpatch.pl errors

This patch set contains 3 fixes for duplicate symbol creation in the
db-export implementation and one new symbol API required for the fixes.

commit 9c7b37cd63d0 ("perf symbols: Fix handling of zero-length symbols.")
already removed the majority of duplicates, but these fixes take care of
the remaining corner cases.

each patch (except for the 1st, which is a dependency for patch 2) reduces
the number of duplicate symbols exported. When all patches are applied,
my test workload has no more duplicate symbols being exported.

Tests ran:

$perf record --call-graph=dwarf stress -c 2 -t 20
$perf script -s scripts/python/export-to-postgresql.py test all callchains
$psql test

To show the effect of the changes we run the following query before/after
the changes on a database created using the export-to-postgresql.py script
with callchains enabled. If this query returns any value greater than 1,
then it means that there are duplicates present. 


In the test workload, at least one symbol occurs 299 times before applying
the fixes:

  test=# select count(*) as cnt from symbols group by 
	sym_start,sym_end,dso_id order by cnt desc limit 1;
   cnt 
  -----
   299
  (1 row)

After applying the fixes no symbol occurs more than once:

  test=# select count(*) as cnt from symbols group by
	sym_start,sym_end,dso_id order by cnt desc limit 1;
   cnt 
  -----
     1
  (1 row)

Chris Phlipot (4):
  perf symbols: add dso__insert_symbol function
  perf script: fix symbol insertion behavior in db-export
  perf script: fix callchain addresses in db-export
  perf script: fix export of callchains with recursion in db-export

 tools/perf/util/db-export.c | 12 ++++++------
 tools/perf/util/symbol.c    | 12 ++++++++++++
 tools/perf/util/symbol.h    |  3 +++
 3 files changed, 21 insertions(+), 6 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-05-12 10:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-11  3:26 [PATCH v2 0/4] perf script: fix duplicate symbols in db-export Chris Phlipot
2016-05-11  3:26 ` [PATCH v2 1/4] perf symbols: add dso__insert_symbol function Chris Phlipot
2016-05-12 10:22   ` [tip:perf/core] perf symbols: Add " tip-bot for Chris Phlipot
2016-05-11  3:26 ` [PATCH v2 2/4] perf script: fix symbol insertion behavior in db-export Chris Phlipot
2016-05-12 10:22   ` [tip:perf/core] perf script: Fix " tip-bot for Chris Phlipot
2016-05-11  3:26 ` [PATCH v2 3/4] perf script: fix callchain addresses " Chris Phlipot
2016-05-12 10:22   ` [tip:perf/core] perf script: Fix " tip-bot for Chris Phlipot
2016-05-11  3:26 ` [PATCH v2 4/4] perf script: fix export of callchains with recursion " Chris Phlipot
2016-05-12 10:23   ` [tip:perf/core] perf script: Fix " tip-bot for Chris Phlipot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox