perf/urgent fix:
. Two functions from different binaries can have same start address. Thus, comparing only start address in match_chain() leads to inconsistent callchains. Fix this by adding a check for dsos as well (Ravi Bangoria) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEELb9bqkb7Te0zijNb1lAW81NSqkAFAlnWcjwACgkQ1lAW81NS qkD68A/9ERmY8DOKjUKudjLC2MtbN+BGhZNlFbKseNTouicFOSvEQxEP4lPAQbEE jdv8GvJppcrmXjqFBNjncKJxemldv6JIQNnOLB48wAhNVGld59qecC/piwFR/L94 NIj8kCRvT1/wtCzgf22pGrLOb/EoHYVjGxYjSiohe10mWfrLTxErULTWX/2q42vX 0eVL5dC4TKNKiLiVK2Yy/meXIPs6D+9EQh6hcQYOOjtxANnwU5yejDLlZrCaPPAT EF9DZ6I1bB04w6pp685mi5gGI+zDt5pOxpxAQldHAuyTomvty2bcWfm4Tve5UVoL /Kyrq5QbtQEFLF47w2wW3P+DG5gY5CR9L7U4Fzw8IbEnUuKfi32VANc5yvnpqfpp G+dNl4DugEBLgr3M9X5JDvVID4BWcbaYsGWtgQNMLncaB/O8uqDH3gkxPHabG/R0 TNfMJpCUP3945F87I24r/um2l4vJgHPkbNAvW39dqiYHEIJXKh1ASTCTdXr6YKG/ VRL63rYDjfhw+CyF+TRfNfpbRleL3w5pTVuRwEh5m6r+q5ybMi5q6JY3vzCI5Y1P LnB2CX2u3rZduh7DB9rWBs0NLuIdA7R3cbSn3ZkbviK8FEjktgOgSd58byYrGdxF opGqZ1QAh+plu2KzksGVvAPk8AZh7djZIjuMMuRSTXkl31EHEs4= =U+wc -----END PGP SIGNATURE----- Merge tag 'perf-urgent-for-mingo-4.14-20171005' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fix from Arnaldo Carvalho de Melo: - Two functions from different binaries can have the same start address. Thus, comparing only the start address in match_chain() leads to inconsistent callchains. Fix this by adding a check for DSOs as well (Ravi Bangoria) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
874d48f2af
|
@ -685,6 +685,8 @@ static enum match_result match_chain(struct callchain_cursor_node *node,
|
|||
{
|
||||
struct symbol *sym = node->sym;
|
||||
u64 left, right;
|
||||
struct dso *left_dso = NULL;
|
||||
struct dso *right_dso = NULL;
|
||||
|
||||
if (callchain_param.key == CCKEY_SRCLINE) {
|
||||
enum match_result match = match_chain_srcline(node, cnode);
|
||||
|
@ -696,12 +698,14 @@ static enum match_result match_chain(struct callchain_cursor_node *node,
|
|||
if (cnode->ms.sym && sym && callchain_param.key == CCKEY_FUNCTION) {
|
||||
left = cnode->ms.sym->start;
|
||||
right = sym->start;
|
||||
left_dso = cnode->ms.map->dso;
|
||||
right_dso = node->map->dso;
|
||||
} else {
|
||||
left = cnode->ip;
|
||||
right = node->ip;
|
||||
}
|
||||
|
||||
if (left == right) {
|
||||
if (left == right && left_dso == right_dso) {
|
||||
if (node->branch) {
|
||||
cnode->branch_count++;
|
||||
|
||||
|
|
Loading…
Reference in New Issue