linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Riccardo Mancini <rickyman7@gmail.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>,
	Ian Rogers <irogers@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>,
	Riccardo Mancini <rickyman7@gmail.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: [PATCH 2/3] perf jvmti: use gettid from libc_compat
Date: Thu, 22 Jul 2021 17:34:15 +0200	[thread overview]
Message-ID: <4e24f9b00cbe53520cfe66781b29a3977ae23243.1626966805.git.rickyman7@gmail.com> (raw)
In-Reply-To: <cover.1626966805.git.rickyman7@gmail.com>

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


  parent reply	other threads:[~2021-07-22 15:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22 15:34 [PATCH 0/3] tools: add gettid to libc_compat.h Riccardo Mancini
2021-07-22 15:34 ` [PATCH 1/3] tools libc_compat: add gettid Riccardo Mancini
2021-07-25 22:04   ` kernel test robot
2021-07-26 10:43     ` Riccardo Mancini
2021-07-22 15:34 ` Riccardo Mancini [this message]
2021-07-22 15:34 ` [PATCH 3/3] perf test: mmap-thread-lookup: use gettid Riccardo Mancini
2021-07-22 23:31 ` [PATCH 0/3] tools: add gettid to libc_compat.h Ian Rogers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4e24f9b00cbe53520cfe66781b29a3977ae23243.1626966805.git.rickyman7@gmail.com \
    --to=rickyman7@gmail.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).