perf: Only include tsc file for x86
PATCH 1/1 perf: Only include tsc file for x86
perf_time_to_tsc and tsc_to_perf_time are only used for x86. Make inclusion of tsc.c dependent on x86 as well.
--- tools/perf/util/Build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/Build +1 -1
@@ -71,7 +71,7 @@ libperf-y += stat.o libperf-y += record.o libperf-y += srcline.o libperf-y += data.o -libperf-y += tsc.o +libperf-$(CONFIG_X86) += tsc.o libperf-y += cloexec.o libperf-y += thread-stack.o
Signature · 1 line
1.9.3
Quoted 2 lines · David Ahern
perf_time_to_tscandtsc_to_perf_timeare only used for x86. Make inclusion oftsc.cdependent on x86 as well.
hum, should we move it to arch/x86/util/tsc.c and remove util/tsc.c?
looks like it's used only by test tsc code, which is enabled for x86 only anyway..
jirka
Quoted 24 lines
Signed-off-by David Ahern <[email protected]>Cc Adrian Hunter <[email protected]>Cc Jiri Olsa <[email protected]>--- tools/perf/util/Build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/util/Build +1
-1@@ -71,7 +71,7 @@ libperf-y += stat.o libperf-y += record.o libperf-y += srcline.o libperf-y += data.o -libperf-y += tsc.o +libperf-$(CONFIG_X86) += tsc.o libperf-y += cloexec.o libperf-y += thread-stack.oSignature · 1 line
1.9.3
Adrian Hunter
reviewerQuoted 5 lines · Jiri Olsa
Quoted 2 lines · David Ahern
perf_time_to_tscandtsc_to_perf_timeare only used for x86. Make inclusion oftsc.cdependent on x86 as well.hum, should we move it to
arch/x86/util/tsc.cand removeutil/tsc.c?
It is not arch-specific because you can read a perf.data file from one architecture on another architecture.
The TSC stuff was planned for Intel PT although it might now be done differently.
Probably you should have CONFIG_X86_TSC and then select that with CONFIG_X86. Later it can be selected with CONFIG_INTEL_PT as well.
Quoted 32 lines
looks like it's used only by test tsc code, which is enabled for x86 only anyway..
jirka
Quoted 24 lines
Signed-off-by David Ahern <[email protected]>Cc Adrian Hunter <[email protected]>Cc Jiri Olsa <[email protected]>--- tools/perf/util/Build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/util/Build +1
-1@@ -71,7 +71,7 @@ libperf-y += stat.o libperf-y += record.o libperf-y += srcline.o libperf-y += data.o -libperf-y += tsc.o +libperf-$(CONFIG_X86) += tsc.o libperf-y += cloexec.o libperf-y += thread-stack.oSignature · 1 line
1.9.3
Quoted 10 lines · Adrian Hunter
Quoted 5 lines · Jiri Olsa
Quoted 2 lines · David Ahern
perf_time_to_tscandtsc_to_perf_timeare only used for x86. Make inclusion oftsc.cdependent on x86 as well.hum, should we move it to
arch/x86/util/tsc.cand removeutil/tsc.c?It is not arch-specific because you can read a perf.data file from one architecture on another architecture.
Quoted 6 lines
The TSC stuff was planned for Intel PT although it might now be done differently.
Probably you should have
CONFIG_X86_TSCand then select that withCONFIG_X86. Later it can be selected withCONFIG_INTEL_PTas well.
For now let's leave it as CONFIG_X86. Right now only X86 code needs the functions it provides and there is no need taking any other steps until something is going to use it.
ie., patch is good as is. Agreed?
David
Quoted 34 lines
Quoted 33 lines
looks like it's used only by test tsc code, which is enabled for x86 only anyway..
jirka
Quoted 24 lines
Signed-off-by David Ahern <[email protected]>Cc Adrian Hunter <[email protected]>Cc Jiri Olsa <[email protected]>--- tools/perf/util/Build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/util/Build +1
-2@@ -71,7 +71,7 @@ libperf-y += stat.o libperf-y += record.o libperf-y += srcline.o libperf-y += data.o -libperf-y += tsc.o +libperf-$(CONFIG_X86) += tsc.o libperf-y += cloexec.o libperf-y += thread-stack.o --1.9.3
Quoted 18 lines · David Ahern
Quoted 10 lines · Adrian Hunter
Quoted 5 lines · Jiri Olsa
Quoted 2 lines · David Ahern
perf_time_to_tscandtsc_to_perf_timeare only used for x86. Make inclusion oftsc.cdependent on x86 as well.hum, should we move it to
arch/x86/util/tsc.cand removeutil/tsc.c?It is not arch-specific because you can read a perf.data file from one architecture on another architecture.
Quoted 6 lines
The TSC stuff was planned for Intel PT although it might now be done differently.
Probably you should have
CONFIG_X86_TSCand then select that withCONFIG_X86. Later it can be selected withCONFIG_INTEL_PTas well.
Quoted 5 lines
For now let's leave it as
CONFIG_X86. Right now only X86 code needs the functions it provides and there is no need taking any other steps until something is going to use it.ie., patch is good as is. Agreed?
ook, jirka
tip-bot for David Ahern
merge bot[tip:perf/core] perf tools: Only include tsc file for x86
In reply to David Ahernperf tools: Only include tsc file for x86
Commit-ID: ecefde629fadd3fcca2ea4c6a799d6e6aab8781f Gitweb: http://git.kernel.org/tip/ecefde629fadd3fcca2ea4c6a799d6e6aab8781f Author: David Ahern <[email protected]> AuthorDate: Thu, 19 Feb 2015 13:22:33 -0500 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Mon, 2 Mar 2015 11:50:08 -0300
perf tools: Only include tsc file for x86
The perf_time_to_tsc and tsc_to_perf_time functions are only used for x86.
Make inclusion of tsc.c dependent on x86 as well.
--- tools/perf/util/Build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/Build +1 -1
@@ -71,7 +71,7 @@ libperf-y += stat.o libperf-y += record.o libperf-y += srcline.o libperf-y += data.o -libperf-y += tsc.o +libperf-$(CONFIG_X86) += tsc.o libperf-y += cloexec.o libperf-y += thread-stack.o