[all-commits] [llvm/llvm-project] dbb79c: [BOLT][Instrumentation] Initial instrumentation su...
wangjue via All-commits
all-commits at lists.llvm.org
Wed Apr 16 23:01:21 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: dbb79c30c9f3578b7afd9ea0ec33f82e70e472c7
https://github.com/llvm/llvm-project/commit/dbb79c30c9f3578b7afd9ea0ec33f82e70e472c7
Author: wangjue <wangjue at zhcomputing.com>
Date: 2025-04-16 (Wed, 16 Apr 2025)
Changed paths:
M bolt/CMakeLists.txt
M bolt/lib/Core/Relocation.cpp
M bolt/lib/Rewrite/RewriteInstance.cpp
M bolt/lib/Target/RISCV/RISCVMCPlusBuilder.cpp
M bolt/runtime/CMakeLists.txt
M bolt/runtime/common.h
M bolt/runtime/instr.cpp
A bolt/runtime/sys_riscv64.h
A bolt/test/runtime/RISCV/basic-instrumentation.s
A bolt/test/runtime/RISCV/instrumentation-ind-call.c
A bolt/test/runtime/RISCV/lit.local.cfg
Log Message:
-----------
[BOLT][Instrumentation] Initial instrumentation support for RISCV64 (#133882)
This patch adds code generation for RISCV64 instrumentation.The work
involved includes the following three points:
a) Implements support for instrumenting direct function call and jump
on RISC-V which relies on , Atomic instructions
(used to increment counters) are only available on RISC-V when the A
extension is used.
b) Implements support for instrumenting direct function inderect call
by implementing the createInstrumentedIndCallHandlerEntryBB and
createInstrumentedIndCallHandlerExitBB interfaces. In this process, we
need to accurately record the target address and IndCallID to ensure
the correct recording of the indirect call counters.
c)Implemented the RISCV64 Bolt runtime library, implemented some system
call interfaces through embedded assembly. Get the difference between
runtime addrress of .text section andstatic address in section header
table, which in turn can be used to search for indirect call
description.
However, the community code currently has problems with relocation in
some scenarios, but this has nothing to do with instrumentation. We
may continue to submit patches to fix the related bugs.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list