Skip to content

Commit

Permalink
arch/riscv64: Support library call tracing
Browse files Browse the repository at this point in the history
As PLT hooking is implemented, we can enable --libcall option on RISC-V.

  $ uftrace --force uname -m | head
  riscv64
  # DURATION     TID     FUNCTION
     4.800 us [  4503] | strrchr();
     5.766 ms [  4503] | setlocale();
     9.700 us [  4503] | bindtextdomain();
     5.600 us [  4503] | textdomain();
     2.700 us [  4503] | __cxa_atexit();
     7.000 us [  4503] | getopt_long();
     1.600 us [  4503] | getopt_long();
    13.500 us [  4503] | uname();

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
  • Loading branch information
namhyung committed Dec 6, 2023
1 parent 9625b20 commit 21efde7
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions uftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1389,10 +1389,7 @@ int main(int argc, char *argv[])
struct uftrace_opts opts = {
.mode = UFTRACE_MODE_INVALID,
.dirname = UFTRACE_DIR_NAME,
#if !defined(__riscv)
/* FIXME: disable libcall until PLT hooking is implemented in riscv64. */
.libcall = true,
#endif
.bufsize = SHMEM_BUFFER_SIZE,
.max_stack = OPT_RSTACK_DEFAULT,
.port = UFTRACE_RECV_PORT,
Expand Down

0 comments on commit 21efde7

Please sign in to comment.