* [PATCH] perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy()
@ 2019-10-08 9:38 Thomas Richter
2019-10-14 14:27 ` Arnaldo Carvalho de Melo
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Thomas Richter @ 2019-10-08 9:38 UTC (permalink / raw)
To: linux-kernel, linux-perf-users, acme; +Cc: gor, heiko.carstens, Thomas Richter
The build of file libperf-jvmti.so succeeds but the resulting
object fails to load:
# ~/linux/tools/perf/perf record -k mono -- java \
-XX:+PreserveFramePointer \
-agentpath:/root/linux/tools/perf/libperf-jvmti.so \
hog 100000 123450
Error occurred during initialization of VM
Could not find agent library /root/linux/tools/perf/libperf-jvmti.so
in absolute path, with error:
/root/linux/tools/perf/libperf-jvmti.so: undefined symbol: _ctype
Add the missing _ctype symbol into the build script.
Fixes: c5d048240e49 ("perf jvmti: Link against tools/lib/string.h to have weak strlcpy()")
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
---
tools/perf/jvmti/Build | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/perf/jvmti/Build b/tools/perf/jvmti/Build
index 1e148bbdf820..202cadaaf097 100644
--- a/tools/perf/jvmti/Build
+++ b/tools/perf/jvmti/Build
@@ -2,7 +2,7 @@ jvmti-y += libjvmti.o
jvmti-y += jvmti_agent.o
# For strlcpy
-jvmti-y += libstring.o
+jvmti-y += libstring.o libctype.o
CFLAGS_jvmti = -fPIC -DPIC -I$(JDIR)/include -I$(JDIR)/include/linux
CFLAGS_REMOVE_jvmti = -Wmissing-declarations
@@ -15,3 +15,7 @@ CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PE
$(OUTPUT)jvmti/libstring.o: ../lib/string.c FORCE
$(call rule_mkdir)
$(call if_changed_dep,cc_o_c)
+
+$(OUTPUT)jvmti/libctype.o: ../lib/ctype.c FORCE
+ $(call rule_mkdir)
+ $(call if_changed_dep,cc_o_c)
--
2.21.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy()
2019-10-08 9:38 [PATCH] perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy() Thomas Richter
@ 2019-10-14 14:27 ` Arnaldo Carvalho de Melo
2019-10-21 6:26 ` [tip: perf/urgent] " tip-bot2 for Thomas Richter
2019-10-21 23:19 ` [tip: perf/core] " tip-bot2 for Thomas Richter
2 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-10-14 14:27 UTC (permalink / raw)
To: Thomas Richter; +Cc: linux-kernel, linux-perf-users, gor, heiko.carstens
Em Tue, Oct 08, 2019 at 11:38:41AM +0200, Thomas Richter escreveu:
> The build of file libperf-jvmti.so succeeds but the resulting
> object fails to load:
>
> # ~/linux/tools/perf/perf record -k mono -- java \
> -XX:+PreserveFramePointer \
> -agentpath:/root/linux/tools/perf/libperf-jvmti.so \
> hog 100000 123450
> Error occurred during initialization of VM
> Could not find agent library /root/linux/tools/perf/libperf-jvmti.so
> in absolute path, with error:
> /root/linux/tools/perf/libperf-jvmti.so: undefined symbol: _ctype
>
> Add the missing _ctype symbol into the build script.
>
> Fixes: c5d048240e49 ("perf jvmti: Link against tools/lib/string.h to have weak strlcpy()")
Thanks, applied.
- Arnaldo
> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> ---
> tools/perf/jvmti/Build | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/jvmti/Build b/tools/perf/jvmti/Build
> index 1e148bbdf820..202cadaaf097 100644
> --- a/tools/perf/jvmti/Build
> +++ b/tools/perf/jvmti/Build
> @@ -2,7 +2,7 @@ jvmti-y += libjvmti.o
> jvmti-y += jvmti_agent.o
>
> # For strlcpy
> -jvmti-y += libstring.o
> +jvmti-y += libstring.o libctype.o
>
> CFLAGS_jvmti = -fPIC -DPIC -I$(JDIR)/include -I$(JDIR)/include/linux
> CFLAGS_REMOVE_jvmti = -Wmissing-declarations
> @@ -15,3 +15,7 @@ CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PE
> $(OUTPUT)jvmti/libstring.o: ../lib/string.c FORCE
> $(call rule_mkdir)
> $(call if_changed_dep,cc_o_c)
> +
> +$(OUTPUT)jvmti/libctype.o: ../lib/ctype.c FORCE
> + $(call rule_mkdir)
> + $(call if_changed_dep,cc_o_c)
> --
> 2.21.0
--
- Arnaldo
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip: perf/urgent] perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy()
2019-10-08 9:38 [PATCH] perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy() Thomas Richter
2019-10-14 14:27 ` Arnaldo Carvalho de Melo
@ 2019-10-21 6:26 ` tip-bot2 for Thomas Richter
2019-10-21 23:19 ` [tip: perf/core] " tip-bot2 for Thomas Richter
2 siblings, 0 replies; 4+ messages in thread
From: tip-bot2 for Thomas Richter @ 2019-10-21 6:26 UTC (permalink / raw)
To: linux-tip-commits
Cc: Thomas Richter, Heiko Carstens, Vasily Gorbik,
Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov,
linux-kernel
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: 6a6fac11b11299aa5bd8532ea863fc2f652af2b6
Gitweb: https://git.kernel.org/tip/6a6fac11b11299aa5bd8532ea863fc2f652af2b6
Author: Thomas Richter <tmricht@linux.ibm.com>
AuthorDate: Tue, 08 Oct 2019 11:38:41 +02:00
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitterDate: Tue, 15 Oct 2019 11:47:38 -03:00
perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy()
The build of file libperf-jvmti.so succeeds but the resulting
object fails to load:
# ~/linux/tools/perf/perf record -k mono -- java \
-XX:+PreserveFramePointer \
-agentpath:/root/linux/tools/perf/libperf-jvmti.so \
hog 100000 123450
Error occurred during initialization of VM
Could not find agent library /root/linux/tools/perf/libperf-jvmti.so
in absolute path, with error:
/root/linux/tools/perf/libperf-jvmti.so: undefined symbol: _ctype
Add the missing _ctype symbol into the build script.
Fixes: 79743bc927f6 ("perf jvmti: Link against tools/lib/string.o to have weak strlcpy()")
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Link: http://lore.kernel.org/lkml/20191008093841.59387-1-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/jvmti/Build | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/perf/jvmti/Build b/tools/perf/jvmti/Build
index 1e148bb..202cada 100644
--- a/tools/perf/jvmti/Build
+++ b/tools/perf/jvmti/Build
@@ -2,7 +2,7 @@ jvmti-y += libjvmti.o
jvmti-y += jvmti_agent.o
# For strlcpy
-jvmti-y += libstring.o
+jvmti-y += libstring.o libctype.o
CFLAGS_jvmti = -fPIC -DPIC -I$(JDIR)/include -I$(JDIR)/include/linux
CFLAGS_REMOVE_jvmti = -Wmissing-declarations
@@ -15,3 +15,7 @@ CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PE
$(OUTPUT)jvmti/libstring.o: ../lib/string.c FORCE
$(call rule_mkdir)
$(call if_changed_dep,cc_o_c)
+
+$(OUTPUT)jvmti/libctype.o: ../lib/ctype.c FORCE
+ $(call rule_mkdir)
+ $(call if_changed_dep,cc_o_c)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [tip: perf/core] perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy()
2019-10-08 9:38 [PATCH] perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy() Thomas Richter
2019-10-14 14:27 ` Arnaldo Carvalho de Melo
2019-10-21 6:26 ` [tip: perf/urgent] " tip-bot2 for Thomas Richter
@ 2019-10-21 23:19 ` tip-bot2 for Thomas Richter
2 siblings, 0 replies; 4+ messages in thread
From: tip-bot2 for Thomas Richter @ 2019-10-21 23:19 UTC (permalink / raw)
To: linux-tip-commits
Cc: Thomas Richter, Heiko Carstens, Vasily Gorbik,
Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov,
linux-kernel
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 5fb470bc29d8e2ff0e1cab4fbb580a06da11ab28
Gitweb: https://git.kernel.org/tip/5fb470bc29d8e2ff0e1cab4fbb580a06da11ab28
Author: Thomas Richter <tmricht@linux.ibm.com>
AuthorDate: Tue, 08 Oct 2019 11:38:41 +02:00
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitterDate: Tue, 15 Oct 2019 08:39:42 -03:00
perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy()
The build of file libperf-jvmti.so succeeds but the resulting
object fails to load:
# ~/linux/tools/perf/perf record -k mono -- java \
-XX:+PreserveFramePointer \
-agentpath:/root/linux/tools/perf/libperf-jvmti.so \
hog 100000 123450
Error occurred during initialization of VM
Could not find agent library /root/linux/tools/perf/libperf-jvmti.so
in absolute path, with error:
/root/linux/tools/perf/libperf-jvmti.so: undefined symbol: _ctype
Add the missing _ctype symbol into the build script.
Fixes: 79743bc927f6 ("perf jvmti: Link against tools/lib/string.o to have weak strlcpy()")
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Link: http://lore.kernel.org/lkml/20191008093841.59387-1-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/jvmti/Build | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/perf/jvmti/Build b/tools/perf/jvmti/Build
index 1e148bb..202cada 100644
--- a/tools/perf/jvmti/Build
+++ b/tools/perf/jvmti/Build
@@ -2,7 +2,7 @@ jvmti-y += libjvmti.o
jvmti-y += jvmti_agent.o
# For strlcpy
-jvmti-y += libstring.o
+jvmti-y += libstring.o libctype.o
CFLAGS_jvmti = -fPIC -DPIC -I$(JDIR)/include -I$(JDIR)/include/linux
CFLAGS_REMOVE_jvmti = -Wmissing-declarations
@@ -15,3 +15,7 @@ CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PE
$(OUTPUT)jvmti/libstring.o: ../lib/string.c FORCE
$(call rule_mkdir)
$(call if_changed_dep,cc_o_c)
+
+$(OUTPUT)jvmti/libctype.o: ../lib/ctype.c FORCE
+ $(call rule_mkdir)
+ $(call if_changed_dep,cc_o_c)
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-22 0:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-08 9:38 [PATCH] perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy() Thomas Richter
2019-10-14 14:27 ` Arnaldo Carvalho de Melo
2019-10-21 6:26 ` [tip: perf/urgent] " tip-bot2 for Thomas Richter
2019-10-21 23:19 ` [tip: perf/core] " tip-bot2 for Thomas Richter
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).