Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1284235

Reorganize perf kernel side

From Borislav Petkov <bp@alien8.de>
Newsgroups linux.kernel
Subject Reorganize perf kernel side
Date 2015-12-04 22:20 +0100
Message-ID <qC5VL-81F-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hi guys,

so I've had my eyes on this for a long time now and it has managed to
get on my nerves just enough to do something about it :-)

So how about moving perf stuff to arch/x86/perf/ and get rid of the
prefixes in the filenames. This also flattens our folder structure which
is a good thing and which we've been talking about in the past.

In order to diminish churn, I can do the whole thing in 4-5 patches'
sets, after having run enough *config smoke tests and 0day bot too.
Anyway, something like that.

perf_event_<vendor>_<type>.c

can then move to arch/x86/perf/<vendor>/type.c

and have much saner structure.

Thoughts?

---
 arch/x86/Kbuild                            | 2 ++
 arch/x86/kernel/cpu/Makefile               | 2 --
 arch/x86/perf/Makefile                     | 1 +
 arch/x86/{kernel/cpu => perf}/perf_event.c | 2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)
 create mode 100644 arch/x86/perf/Makefile
 rename arch/x86/{kernel/cpu => perf}/perf_event.c (99%)

diff --git a/arch/x86/Kbuild b/arch/x86/Kbuild
index 1538562cc720..cd85aa30ad14 100644
--- a/arch/x86/Kbuild
+++ b/arch/x86/Kbuild
@@ -1,6 +1,8 @@
 
 obj-y += entry/
 
+obj-$(CONFIG_PERF_EVENTS) += perf/
+
 obj-$(CONFIG_KVM) += kvm/
 
 # Xen paravirtualization support
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 58031303e304..77000d54fcd1 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -30,8 +30,6 @@ obj-$(CONFIG_CPU_SUP_CENTAUR)		+= centaur.o
 obj-$(CONFIG_CPU_SUP_TRANSMETA_32)	+= transmeta.o
 obj-$(CONFIG_CPU_SUP_UMC_32)		+= umc.o
 
-obj-$(CONFIG_PERF_EVENTS)		+= perf_event.o
-
 ifdef CONFIG_PERF_EVENTS
 obj-$(CONFIG_CPU_SUP_AMD)		+= perf_event_amd.o perf_event_amd_uncore.o
 ifdef CONFIG_AMD_IOMMU
diff --git a/arch/x86/perf/Makefile b/arch/x86/perf/Makefile
new file mode 100644
index 000000000000..3b2566aa58e5
--- /dev/null
+++ b/arch/x86/perf/Makefile
@@ -0,0 +1 @@
+obj-y		+= perf_event.o
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/perf/perf_event.c
similarity index 99%
rename from arch/x86/kernel/cpu/perf_event.c
rename to arch/x86/perf/perf_event.c
index 9dfbba5ce6e8..ccbf7242307c 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/perf/perf_event.c
@@ -37,7 +37,7 @@
 #include <asm/desc.h>
 #include <asm/ldt.h>
 
-#include "perf_event.h"
+#include "../kernel/cpu/perf_event.h"
 
 struct x86_pmu x86_pmu __read_mostly;
 
-- 
2.3.5


-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Reorganize perf kernel side Borislav Petkov <bp@alien8.de> - 2015-12-04 22:20 +0100
  Re: Reorganize perf kernel side Peter Zijlstra <peterz@infradead.org> - 2015-12-04 23:10 +0100
    Re: Reorganize perf kernel side Borislav Petkov <bp@alien8.de> - 2015-12-04 23:50 +0100
  Re: Reorganize perf kernel side Ingo Molnar <mingo@kernel.org> - 2015-12-06 11:00 +0100

csiph-web