This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug runtime/16920] Add aarch64 backtrace support


https://sourceware.org/bugzilla/show_bug.cgi?id=16920

--- Comment #3 from William Cohen <wcohen at redhat dot com> ---
According to mjw the WARNING are due to missing .debug_frame and/or
.eh_frame_hdr sections.  fche rebuilt the kernel to include .debug_frame. The
new kernel seems to get rid of the  WARNINGs about missing sections.

One of the thing missing from the proposed aarch64 backtrace patch is correct
handling in the case of tracepoints like the x86_64.h and i386.h
arch_unw_init_frame_info(). There seems to be a similar flaw in the arm.h and
ppc64.h

It was suggested to use the -DDEBUG_UNWIND.  The arm64 uses u64 rather than
long in struct pt_regs needed to do some casting in the debug output statements
to make sure that the modules build didn't complain about the differences in
argument size and the print specifier.

Now have something lit the following output:

# ../install/bin/stap -v -e 'probe vfs.read {print_backtrace(); exit()}'
-DDEBUG_UNWIND
Pass 1: parsed user script and 104 library script(s) using
152448virt/37120res/6144shr/28032data kb, in 360usr/10sys/375real ms.
Pass 2: analyzed script: 1 probe(s), 2 function(s), 3 embed(s), 0 global(s)
using 259520virt/146368res/7680shr/135104data kb, in 3080usr/260sys/3339real
ms.
Pass 3: translated to C into
"/tmp/stapo5TaX7/stap_64c46b2957b6cce64f14b860371aafb3_1762_src.c" using
259520virt/146624res/7936shr/135104data kb, in 940usr/130sys/1076real ms.
Pass 4: compiled C into "stap_64c46b2957b6cce64f14b860371aafb3_1762.ko" in
14250usr/250sys/15053real ms.
Pass 5: starting run.
_stp_stack_unwind_one_kernel:265: STARTING kernel unwind
 0xfffffe00001e00b8 : vfs_read+0x0/0x198 [kernel]
_stp_stack_unwind_one_kernel:300: CONTINUING kernel unwind to depth 1
unwind:1622: pc=fffffe00001e00b8, fffffe00001e00b8
unwind:1662: trying debug_frame
_stp_search_unwind_hdr:922: binary search for fffffe00001e00b8
_stp_search_unwind_hdr:987: fde off=5d198
_stp_search_unwind_hdr:997: returning fde=fffffdfffd325458
startLoc=fffffe00001e00b8
unwind_frame:1338:
/usr/lib/debug/lib/modules/3.17.0-0.rc7.46.sa2.kprobev2.unwind.aarch64/vmlinux:
fde=fffffdfffd325458
unwind_frame:1343:
/usr/lib/debug/lib/modules/3.17.0-0.rc7.46.sa2.kprobev2.unwind.aarch64/vmlinux:
cie=fffffdfffd325118
parse_fde_cie:305: map retAddrReg value 30 to reg_info idx 30
unwind_frame:1358: startLoc: fffffe00001e00b8, endLoc: fffffe00001e0250
unwind_frame:1407: cie=fffffdfffd325118 fde=fffffdfffd325458
startLoc=fffffe00001e00b8 endLoc=fffffe00001e0250, pc=fffffe00001e00b8
unwind_frame:1427: processCFI for CIE
processCFI:462: targetLoc=0 state->loc=fffffe00001e00b8
processCFI:667: map DW_CFA_def_cfa value 31 to reg_info idx 9999
processCFI:669: DW_CFA_def_cfa reg=31
processCFI:678: DW_CFA_def_cfa_offset offs=0
processCFI:796: targetLoc=0 state->loc=fffffe00001e00b8
processCFI:797: result: 1
unwind_frame:1435: processCFI for FDE
processCFI:462: targetLoc=fffffe00001e00b8 state->loc=fffffe00001e00b8
advance_loc:390: state->loc=fffffe00001e00bc
processCFI:765: DW_CFA_advance_loc
processCFI:796: targetLoc=fffffe00001e00b8 state->loc=fffffe00001e00bc
processCFI:797: result: 1
unwind_frame:1454: cfa reg=31, off=0
unwind_frame:1459: cfa=fffffe00001e0910 startLoc=fffffe00001e0910,
endLoc=fffffe03dd15be80
unwind_frame:1464: cfa startLoc=fffffe00001e0000, endLoc=fffffe00001e0910
unwind_frame:1466: cie=fffffdfffd325118 fde=fffffdfffd325458
unwind_frame:1590: returning 0 (fffffe03d8dc5203)
_stp_stack_unwind_one_kernel:318: ret=0 PC=fffffe03d8dc5203 SP=fffffe00001e0910
 0xfffffe03d8dc5203
_stp_stack_unwind_one_kernel:300: CONTINUING kernel unwind to depth 2
unwind:1622: pc=fffffe03d8dc5202, fffffe03d8dc5203
unwind:1658: No module found for pc=fffffe03d8dc5202
_stp_stack_unwind_one_kernel:318: ret=-22 PC=fffffe03d8dc5203
SP=fffffe00001e0910
 0x0 (inexact)
Pass 5: run completed in 0usr/20sys/561real ms.

-- 
You are receiving this mail because:
You are the assignee for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]