lkml.org 
[lkml]   [2021]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] perf jvmti: use gettid from libc_compat
Date
This patch removes the re-definition of gettid in jvmti_agent.c, adding
the include of the libc_compat.h header, which now contains the gettid
function.

Signed-off-by: Riccardo Mancini <rickyman7@gmail.com>
---
tools/perf/jvmti/jvmti_agent.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/tools/perf/jvmti/jvmti_agent.c b/tools/perf/jvmti/jvmti_agent.c
index 526dcaf9f07903dd..299e7e87198cc18d 100644
--- a/tools/perf/jvmti/jvmti_agent.c
+++ b/tools/perf/jvmti/jvmti_agent.c
@@ -33,7 +33,7 @@
#include <unistd.h>
#include <time.h>
#include <sys/mman.h>
-#include <syscall.h> /* for gettid() */
+#include <tools/libc_compat.h> /* for gettid() */
#include <err.h>
#include <linux/kernel.h>

@@ -45,13 +45,6 @@
static char jit_path[PATH_MAX];
static void *marker_addr;

-#ifndef HAVE_GETTID
-static inline pid_t gettid(void)
-{
- return (pid_t)syscall(__NR_gettid);
-}
-#endif
-
static int get_e_machine(struct jitheader *hdr)
{
ssize_t sret;
--
2.31.1
\
 
 \ /
  Last update: 2021-07-22 19:35    [W:0.981 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site