In my opinion a mentioned patch [1] does not work properly since it defines _UPT_reg_offset elements as
+ [UNW_MIPS_R0] = 0, + [UNW_MIPS_R1] = 1, + [UNW_MIPS_R2] = 2, + [UNW_MIPS_R3] = 3, + [UNW_MIPS_R4] = 4, + [UNW_MIPS_R5] = 5, + [UNW_MIPS_R6] = 6, + [UNW_MIPS_R7] = 7, + [UNW_MIPS_R8] = 8, + [UNW_MIPS_R9] = 9, + [UNW_MIPS_R10] = 10, + [UNW_MIPS_R11] = 11, + [UNW_MIPS_R12] = 12, + [UNW_MIPS_R13] = 13, + [UNW_MIPS_R14] = 14, + [UNW_MIPS_R15] = 15, + [UNW_MIPS_R16] = 16, + [UNW_MIPS_R17] = 17, + [UNW_MIPS_R18] = 18, + [UNW_MIPS_R19] = 19, + [UNW_MIPS_R20] = 20, + [UNW_MIPS_R21] = 21, + [UNW_MIPS_R22] = 22, + [UNW_MIPS_R23] = 23, + [UNW_MIPS_R24] = 24, + [UNW_MIPS_R25] = 25, + [UNW_MIPS_R26] = 26, + [UNW_MIPS_R27] = 27, + [UNW_MIPS_R28] = 28, + [UNW_MIPS_R29] = 29, + [UNW_MIPS_R30] = 30, + [UNW_MIPS_R31] = 31, + [UNW_MIPS_PC] = 64, but a code in _UPT_access_mem.c expects that _UPT_reg_offset is a byte offset, and not a word offset or a register index. [1] http://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=commit;h=2a5d1a629634b3225fccb1ed8a0a765bccc77f2e On Sun, Jul 29, 2018 at 6:18 PM, Sapir Natan <sapi...@checkpoint.com> wrote: > Hi, > > > > We are trying to obtain a callgraph using ‘perf’ utility, while running on > MIPS architecture with linux 3.10 (64Bit processes) > > We wish to obtain callgraph on: > > · Terminated processes > > · Running processes (using –p <pid>) > > > > Following the resolution that perf is unable to create callgraph on MIPS > using frame pointer, we tried using libunwind > > Since ‘dwarf’ option for perf isn’t part of linux 3.10 (or any other > version), we added a patch (composed of the following 3 patches): > > · https://www.linux-mips.org/archives/linux-mips/2013-05/ > msg00123.html > > · https://www.linux-mips.org/archives/linux-mips/2013-05/ > msg00115.html > > · https://www.linux-mips.org/archives/linux-mips/2016-04/ > msg00003.html > > · As part of the patch we also linked ‘perf’ with ‘libunwind’ > (open source version *1.2.1*). > > > > This patch added the ‘dwarf’ capability to ‘perf’ on MIPS, however we > still couldn’t obtain a usable callgraph (most functions had no trace) > > The problem we encountered was that when reaching *‘maps__find´* function > (*linux/tools/perf/util/map.c*), the binary search for the required entry > failed (could not be located) > > From our investigation, we can support local unwinding but not remote > (which is the type of unwinding required by ‘perf’) > > > > Checking online we saw on ‘libunwind’ NEWS: *‘** Mips remote unwind > support’* for version *1.3*. > > We replaced our ‘*1.2.1*’ version with ‘*1.3-rc1*’ and re-checked, > however the results remained the same (no callgraph). > > > > Could you please assist? > > · What was the issue you encountered that the fix in 1.3 version > resolved? > > · Can the new addition enable ‘perf’ to support callgraph on MIPS? > > · Did we miss anything in our steps (as described above)? > > · Can you advice on the next steps? > > > > Thanks, > > Sapir > > > > _______________________________________________ > Libunwind-devel mailing list > Libunwind-devel@nongnu.org > https://lists.nongnu.org/mailman/listinfo/libunwind-devel > >
_______________________________________________ Libunwind-devel mailing list Libunwind-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/libunwind-devel