perf annotate gets confused by thumb addresses

Bug #677547 reported by Dr. David Alan Gilbert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Linux
Fix Released
Medium
Dr. David Alan Gilbert

Bug Description

Using linux-linaro-tools-2.6.35-1008 (either the package or a version of the perf tools I built from the linux-linaro-next tree at commit 2140f30a928b2fc72af85257b15725ddc4144201 )

I've rebuilt a libc with a thumb2 routine (memset) and perf annotate (either the command or the newt gui version) is starting to disassemble it at an odd (i.e. +1 address); I don't think it understands the use of odd addresses to denote thumb functions:

------------------------------------------------
 Percent | Source code & Disassembly of neon-memset.so
------------------------------------------------
         :
         :
         :
         : Disassembly of section .text:
         :
         : 0005e5b1 <memset+0x1>:
    0.14 : 5e5b1: f246 10b1 movw r0, #25009 ; 0x61b1
    0.00 : 5e5b5: 1ff0 subs r0, r6, #7

The 5e5b1 is the right address as per readelf:
 13022: 0005e5b1 0 FUNC GLOBAL DEFAULT 12 memset

maybe the right answer is a fix up in dso__load_sym in util/symbol.c

but I just fixed up the addresses passed to objdump in hist_entry__annotate which seems to work.

Dave

Revision history for this message
Dr. David Alan Gilbert (davidgil-uk) wrote :
Revision history for this message
Dr. David Alan Gilbert (davidgil-uk) wrote :
Changed in linux-linaro:
assignee: nobody → Dr. David Alan Gilbert (davidgil-uk)
status: New → In Progress
Revision history for this message
Dr. David Alan Gilbert (davidgil-uk) wrote :

Fix is in upstream 2.6.38-rc3, in the Ubuntu built linux-tools-2.6.38-4 and should land in a linaro-linux-tools just as soon as a 2.6.38 lands

Changed in linux-linaro:
status: In Progress → Fix Committed
Revision history for this message
Mounir Bsaibes (mounir-bsaibes) wrote :

I have set the prioirty to medium since the fix is committed.

Changed in linux-linaro:
importance: Undecided → Medium
Revision history for this message
Dr. David Alan Gilbert (davidgil-uk) wrote :

This is fixed in linux-linaro-tools-2.6.38-1000

Changed in linux-linaro:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.