003 File Manager
Current Path:
/usr/src/contrib/llvm-project/compiler-rt/lib/xray
usr
/
src
/
contrib
/
llvm-project
/
compiler-rt
/
lib
/
xray
/
📁
..
📄
weak_symbols.txt
(88 B)
📄
xray_AArch64.cpp
(4.62 KB)
📄
xray_allocator.h
(9.33 KB)
📄
xray_always_instrument.txt
(255 B)
📄
xray_arm.cpp
(5.87 KB)
📄
xray_basic_flags.cpp
(1.52 KB)
📄
xray_basic_flags.h
(1.18 KB)
📄
xray_basic_flags.inc
(1011 B)
📄
xray_basic_logging.cpp
(17.59 KB)
📄
xray_basic_logging.h
(1.68 KB)
📄
xray_buffer_queue.cpp
(7.35 KB)
📄
xray_buffer_queue.h
(8.79 KB)
📄
xray_defs.h
(967 B)
📄
xray_fdr_controller.h
(11.79 KB)
📄
xray_fdr_flags.cpp
(1.47 KB)
📄
xray_fdr_flags.h
(1.2 KB)
📄
xray_fdr_flags.inc
(1.28 KB)
📄
xray_fdr_log_records.h
(2.5 KB)
📄
xray_fdr_log_writer.h
(8.72 KB)
📄
xray_fdr_logging.cpp
(27.62 KB)
📄
xray_fdr_logging.h
(1.53 KB)
📄
xray_flags.cpp
(2.76 KB)
📄
xray_flags.h
(1.12 KB)
📄
xray_flags.inc
(2.29 KB)
📄
xray_function_call_trie.h
(22.36 KB)
📄
xray_init.cpp
(4.6 KB)
📄
xray_interface.cpp
(16.43 KB)
📄
xray_interface_internal.h
(3.2 KB)
📄
xray_log_interface.cpp
(7.53 KB)
📄
xray_mips.cpp
(7.16 KB)
📄
xray_mips64.cpp
(7.66 KB)
📄
xray_never_instrument.txt
(282 B)
📄
xray_powerpc64.cpp
(3.63 KB)
📄
xray_powerpc64.inc
(1019 B)
📄
xray_profile_collector.cpp
(14.06 KB)
📄
xray_profile_collector.h
(2.73 KB)
📄
xray_profiling.cpp
(17.55 KB)
📄
xray_profiling_flags.cpp
(1.34 KB)
📄
xray_profiling_flags.h
(1.17 KB)
📄
xray_profiling_flags.inc
(1.4 KB)
📄
xray_recursion_guard.h
(1.8 KB)
📄
xray_segmented_array.h
(21.22 KB)
📄
xray_trampoline_AArch64.S
(6.1 KB)
📄
xray_trampoline_arm.S
(3.85 KB)
📄
xray_trampoline_mips.S
(2.67 KB)
📄
xray_trampoline_mips64.S
(3.47 KB)
📄
xray_trampoline_powerpc64.cpp
(420 B)
📄
xray_trampoline_powerpc64_asm.S
(3.91 KB)
📄
xray_trampoline_x86_64.S
(7.06 KB)
📄
xray_tsc.h
(2.75 KB)
📄
xray_utils.cpp
(6.04 KB)
📄
xray_utils.h
(2.18 KB)
📄
xray_x86_64.cpp
(11.73 KB)
📄
xray_x86_64.inc
(997 B)
Editing: xray_trampoline_arm.S
#include "../builtins/assembly.h" .syntax unified .arch armv6t2 .fpu vfpv2 .code 32 .global _ZN6__xray19XRayPatchedFunctionE @ Word-aligned function entry point .p2align 2 @ Let C/C++ see the symbol .global __xray_FunctionEntry .hidden __xray_FunctionEntry @ It preserves all registers except r0, r12(ip), r14(lr) and r15(pc) @ Assume that "q" part of the floating-point registers is not used @ for passing parameters to C/C++ functions. .type __xray_FunctionEntry, %function @ In C++ it is void extern "C" __xray_FunctionEntry(uint32_t FuncId) with @ FuncId passed in r0 register. __xray_FunctionEntry: PUSH {r1-r3,lr} @ Save floating-point parameters of the instrumented function VPUSH {d0-d7} MOVW r1, #:lower16:_ZN6__xray19XRayPatchedFunctionE - (. + 16) MOVT r1, #:upper16:_ZN6__xray19XRayPatchedFunctionE - (. + 12) LDR r2, [pc, r1] @ Handler address is nullptr if handler is not set CMP r2, #0 BEQ FunctionEntry_restore @ Function ID is already in r0 (the first parameter). @ r1=0 means that we are tracing an entry event MOV r1, #0 @ Call the handler with 2 parameters in r0 and r1 BLX r2 FunctionEntry_restore: @ Restore floating-point parameters of the instrumented function VPOP {d0-d7} POP {r1-r3,pc} @ Word-aligned function entry point .p2align 2 @ Let C/C++ see the symbol .global __xray_FunctionExit .hidden __xray_FunctionExit @ Assume that d1-d7 are not used for the return value. @ Assume that "q" part of the floating-point registers is not used for the @ return value in C/C++. .type __xray_FunctionExit, %function @ In C++ it is extern "C" void __xray_FunctionExit(uint32_t FuncId) with @ FuncId passed in r0 register. __xray_FunctionExit: PUSH {r1-r3,lr} @ Save the floating-point return value of the instrumented function VPUSH {d0} @ Load the handler address MOVW r1, #:lower16:_ZN6__xray19XRayPatchedFunctionE - (. + 16) MOVT r1, #:upper16:_ZN6__xray19XRayPatchedFunctionE - (. + 12) LDR r2, [pc, r1] @ Handler address is nullptr if handler is not set CMP r2, #0 BEQ FunctionExit_restore @ Function ID is already in r0 (the first parameter). @ 1 means that we are tracing an exit event MOV r1, #1 @ Call the handler with 2 parameters in r0 and r1 BLX r2 FunctionExit_restore: @ Restore the floating-point return value of the instrumented function VPOP {d0} POP {r1-r3,pc} @ Word-aligned function entry point .p2align 2 @ Let C/C++ see the symbol .global __xray_FunctionTailExit .hidden __xray_FunctionTailExit @ It preserves all registers except r0, r12(ip), r14(lr) and r15(pc) @ Assume that "q" part of the floating-point registers is not used @ for passing parameters to C/C++ functions. .type __xray_FunctionTailExit, %function @ In C++ it is void extern "C" __xray_FunctionTailExit(uint32_t FuncId) @ with FuncId passed in r0 register. __xray_FunctionTailExit: PUSH {r1-r3,lr} @ Save floating-point parameters of the instrumented function VPUSH {d0-d7} MOVW r1, #:lower16:_ZN6__xray19XRayPatchedFunctionE - (. + 16) MOVT r1, #:upper16:_ZN6__xray19XRayPatchedFunctionE - (. + 12) LDR r2, [pc, r1] @ Handler address is nullptr if handler is not set CMP r2, #0 BEQ FunctionTailExit_restore @ Function ID is already in r0 (the first parameter). @ r1=2 means that we are tracing a tail exit event @ But before the logging part of XRay is ready, we pretend that here a @ normal function exit happens, so we give the handler code 1 MOV r1, #1 @ Call the handler with 2 parameters in r0 and r1 BLX r2 FunctionTailExit_restore: @ Restore floating-point parameters of the instrumented function VPOP {d0-d7} POP {r1-r3,pc} NO_EXEC_STACK_DIRECTIVE
Upload File
Create Folder