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


Groups > linux.kernel > #1330161 > unrolled thread

[tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c

Started bytip-bot for Borislav Petkov <tipbot@zytor.com>
First post2016-02-09 13:20 +0100
Last post2016-02-09 15:10 +0100
Articles 6 — 5 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [tip:perf/core] perf/x86: Move perf_event.c ............... =>   x86/events/core.c tip-bot for Borislav Petkov <tipbot@zytor.com> - 2016-02-09 13:20 +0100
    Re: [tip:perf/core] perf/x86: Move perf_event.c ............... =>   x86/events/core.c Vince Weaver <vincent.weaver@maine.edu> - 2016-02-09 15:00 +0100
      Re: [tip:perf/core] perf/x86: Move perf_event.c ............... =>  x86/events/core.c Ingo Molnar <mingo@kernel.org> - 2016-02-09 15:10 +0100
        Re: [tip:perf/core] perf/x86: Move perf_event.c ............... =>  x86/events/core.c Borislav Petkov <bp@suse.de> - 2016-02-09 15:20 +0100
        Re: {SPAM?} Re: [tip:perf/core] perf/x86: Move perf_event.c  ............... => x86/events/core.c Vince Weaver <vincent.weaver@maine.edu> - 2016-02-12 23:20 +0100
      Re: [tip:perf/core] perf/x86: Move perf_event.c ............... =>  x86/events/core.c Thomas Gleixner <tglx@linutronix.de> - 2016-02-09 15:10 +0100

#1330161 — [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c

Fromtip-bot for Borislav Petkov <tipbot@zytor.com>
Date2016-02-09 13:20 +0100
Subject[tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c
Message-ID<r0fqY-3Sj-57@gated-at.bofh.it>
Commit-ID:  fa9cbf320e996eaa3d219344b6f7013b096cafd9
Gitweb:     http://git.kernel.org/tip/fa9cbf320e996eaa3d219344b6f7013b096cafd9
Author:     Borislav Petkov <bp@suse.de>
AuthorDate: Mon, 8 Feb 2016 17:09:04 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 9 Feb 2016 10:23:49 +0100

perf/x86: Move perf_event.c ............... => x86/events/core.c

Also, keep the churn at minimum by adjusting the include "perf_event.h"
when each file gets moved.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1454947748-28629-2-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/Kbuild                                     | 3 ++-
 arch/x86/events/Makefile                            | 1 +
 arch/x86/{kernel/cpu/perf_event.c => events/core.c} | 2 +-
 arch/x86/kernel/cpu/Makefile                        | 2 --
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/Kbuild b/arch/x86/Kbuild
index 1538562..eb3abf8 100644
--- a/arch/x86/Kbuild
+++ b/arch/x86/Kbuild
@@ -1,6 +1,7 @@
-
 obj-y += entry/
 
+obj-$(CONFIG_PERF_EVENTS) += events/
+
 obj-$(CONFIG_KVM) += kvm/
 
 # Xen paravirtualization support
diff --git a/arch/x86/events/Makefile b/arch/x86/events/Makefile
new file mode 100644
index 0000000..3fad3ce
--- /dev/null
+++ b/arch/x86/events/Makefile
@@ -0,0 +1 @@
+obj-y			+= core.o
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/events/core.c
similarity index 99%
rename from arch/x86/kernel/cpu/perf_event.c
rename to arch/x86/events/core.c
index 7402c818..90ca601 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/events/core.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;
 
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 5803130..77000d5 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

[toc] | [next] | [standalone]


#1330246

FromVince Weaver <vincent.weaver@maine.edu>
Date2016-02-09 15:00 +0100
Message-ID<r0gZI-4N6-19@gated-at.bofh.it>
In reply to#1330161
On Tue, 9 Feb 2016, tip-bot for Borislav Petkov wrote:

> Commit-ID:  fa9cbf320e996eaa3d219344b6f7013b096cafd9
> Gitweb:     http://git.kernel.org/tip/fa9cbf320e996eaa3d219344b6f7013b096cafd9
> Author:     Borislav Petkov <bp@suse.de>
> AuthorDate: Mon, 8 Feb 2016 17:09:04 +0100
> Committer:  Ingo Molnar <mingo@kernel.org>
> CommitDate: Tue, 9 Feb 2016 10:23:49 +0100
> 
> perf/x86: Move perf_event.c ............... => x86/events/core.c
> 
> Also, keep the churn at minimum by adjusting the include "perf_event.h"
> when each file gets moved.

I have to admit I've been falling behind on my lkml reading, but is there 
a good reason for moving all these files around?

I'm often using "git blame" to track down when bugs are introduced, and 
it's a big pain trying to do that across file moves like this.  Although 
that's maybe just due to difficiencies in my git usage skills.

Vince

[toc] | [prev] | [next] | [standalone]


#1330263 — Re: [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c

FromIngo Molnar <mingo@kernel.org>
Date2016-02-09 15:10 +0100
SubjectRe: [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c
Message-ID<r0h9o-56j-11@gated-at.bofh.it>
In reply to#1330246
* Vince Weaver <vincent.weaver@maine.edu> wrote:

> On Tue, 9 Feb 2016, tip-bot for Borislav Petkov wrote:
> 
> > Commit-ID:  fa9cbf320e996eaa3d219344b6f7013b096cafd9
> > Gitweb:     http://git.kernel.org/tip/fa9cbf320e996eaa3d219344b6f7013b096cafd9
> > Author:     Borislav Petkov <bp@suse.de>
> > AuthorDate: Mon, 8 Feb 2016 17:09:04 +0100
> > Committer:  Ingo Molnar <mingo@kernel.org>
> > CommitDate: Tue, 9 Feb 2016 10:23:49 +0100
> > 
> > perf/x86: Move perf_event.c ............... => x86/events/core.c
> > 
> > Also, keep the churn at minimum by adjusting the include "perf_event.h"
> > when each file gets moved.
> 
> I have to admit I've been falling behind on my lkml reading, but is there 
> a good reason for moving all these files around?

Yeah, as the PMU drivers grew organically the naming scheme became a bit messy:

 - for example the uncore drivers are under kernel/cpu/, although they are not
   bound to CPUs.

 - separation between various vendor drivers is not always chrystal clear.

 - the 'kernel/' subdirectory is a needless anachronism, we try to move bits out
   of it when the opportunity presents itself.

 - the new naming also better follows the core kernel/events/ perf code.

I presume after this round of patches is in, Boris will send another round to 
reorganize the Intel PMU drivers as well.

> I'm often using "git blame" to track down when bugs are introduced, and it's a 
> big pain trying to do that across file moves like this.  Although that's maybe 
> just due to difficiencies in my git usage skills.

It seems to work reasonably well here:

241771ef016b5 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2008-12-03 10:39:53 +0100    1) /*
cdd6c482c9ff9 arch/x86/kernel/cpu/perf_event.c   (Ingo Molnar            2009-09-21 12:02:48 +0200    2)  * Performance events x86 architecture code
241771ef016b5 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2008-12-03 10:39:53 +0100    3)  *
98144511427c1 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2009-04-29 14:52:50 +0200    4)  *  Copyright (C) 2008 Thomas Gleixner <tglx@linutronix.de>
98144511427c1 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2009-04-29 14:52:50 +0200    5)  *  Copyright (C) 2008-2009 Red Hat, Inc., Ingo Molnar
98144511427c1 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2009-04-29 14:52:50 +0200    6)  *  Copyright (C) 2009 Jaswinder Singh Rajput
98144511427c1 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2009-04-29 14:52:50 +0200    7)  *  Copyright (C) 2009 Advanced Micro Devices, Inc., Robert Richter
90eec103b96e3 arch/x86/kernel/cpu/perf_event.c   (Peter Zijlstra         2015-11-16 11:08:45 +0100    8)  *  Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra
30dd568c91260 arch/x86/kernel/cpu/perf_counter.c (Markus Metzger         2009-07-21 15:56:48 +0200    9)  *  Copyright (C) 2009 Intel Corporation, <markus.t.metzger@intel.com>
1da53e023029c arch/x86/kernel/cpu/perf_event.c   (Stephane Eranian       2010-01-18 10:58:01 +0200   10)  *  Copyright (C) 2009 Google, Inc., Stephane Eranian
241771ef016b5 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2008-12-03 10:39:53 +0100   11)  *
241771ef016b5 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2008-12-03 10:39:53 +0100   12)  *  For licencing details see kernel-base/COPYING
241771ef016b5 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2008-12-03 10:39:53 +0100   13)  */
241771ef016b5 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2008-12-03 10:39:53 +0100   14) 
[...]
c48b60538c3ba arch/x86/kernel/cpu/perf_event.c   (Vince Weaver           2012-03-01 17:28:14 -0500   84)        rdpmcl(hwc->event_base_rdpmc, new_raw_count);

see for example how Git still knows that we had a 
arch/x86/kernel/cpu/perf_counter.c initial file name.

Or how you did an optimization in c48b60538c3ba when the file was already named 
cpu/perf_event.c! :-)

Thanks,

	Ingo

[toc] | [prev] | [next] | [standalone]


#1330277 — Re: [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c

FromBorislav Petkov <bp@suse.de>
Date2016-02-09 15:20 +0100
SubjectRe: [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c
Message-ID<r0hj4-59v-21@gated-at.bofh.it>
In reply to#1330263
On Tue, Feb 09, 2016 at 03:05:51PM +0100, Ingo Molnar wrote:
> I presume after this round of patches is in, Boris will send another
> round to reorganize the Intel PMU drivers as well.

Yes, he will. He will base them ontop of newest tip/master too.

:-)

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

[toc] | [prev] | [next] | [standalone]


#1333174 — Re: {SPAM?} Re: [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c

FromVince Weaver <vincent.weaver@maine.edu>
Date2016-02-12 23:20 +0100
SubjectRe: {SPAM?} Re: [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c
Message-ID<r1ued-4Bn-11@gated-at.bofh.it>
In reply to#1330263
On Tue, 9 Feb 2016, Ingo Molnar wrote:

> see for example how Git still knows that we had a 
> arch/x86/kernel/cpu/perf_counter.c initial file name.
> 
> Or how you did an optimization in c48b60538c3ba when the file was already named 
> cpu/perf_event.c! :-)

yes, for simple renames it works, but once files start getting 
"reorganized" and split up it gets tricky.  For example trying to track 
things across the single perf_event.h to the separate perf_event.h files
after the UAPI split is always a pain.

But anyway, it sounds like the renames are being done for reasonably good 
reasons, it's just the tip commit message that came my way didn't have 
this extra context.

Thanks,

Vince

[toc] | [prev] | [next] | [standalone]


#1330266 — Re: [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c

FromThomas Gleixner <tglx@linutronix.de>
Date2016-02-09 15:10 +0100
SubjectRe: [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c
Message-ID<r0h9o-56j-21@gated-at.bofh.it>
In reply to#1330246
On Tue, 9 Feb 2016, Vince Weaver wrote:
> On Tue, 9 Feb 2016, tip-bot for Borislav Petkov wrote:
> 
> > Commit-ID:  fa9cbf320e996eaa3d219344b6f7013b096cafd9
> > Gitweb:     http://git.kernel.org/tip/fa9cbf320e996eaa3d219344b6f7013b096cafd9
> > Author:     Borislav Petkov <bp@suse.de>
> > AuthorDate: Mon, 8 Feb 2016 17:09:04 +0100
> > Committer:  Ingo Molnar <mingo@kernel.org>
> > CommitDate: Tue, 9 Feb 2016 10:23:49 +0100
> > 
> > perf/x86: Move perf_event.c ............... => x86/events/core.c
> > 
> > Also, keep the churn at minimum by adjusting the include "perf_event.h"
> > when each file gets moved.
> 
> I have to admit I've been falling behind on my lkml reading, but is there 
> a good reason for moving all these files around?
> 
> I'm often using "git blame" to track down when bugs are introduced, and 
> it's a big pain trying to do that across file moves like this.  Although 
> that's maybe just due to difficiencies in my git usage skills.

git blame still tells you which commit modified a particular line. That's not
lost accross a file move.

git log stops per default when a file moved, but you can tell it not to do so
via "--follow".

Thanks,

	tglx

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web