2005-01-20 18:29:02

by Adrian Bunk

[permalink] [raw]
Subject: [RFC: 2.6 patch] unexport profile_pc

I haven't found any modular usage of profile_pc in the kernel.

Is the patch below correct?


Signed-off-by: Adrian Bunk <[email protected]>

---

arch/arm/kernel/time.c | 1 -
arch/i386/kernel/time.c | 1 -
arch/ppc/kernel/time.c | 1 -
arch/ppc64/kernel/time.c | 1 -
arch/sparc64/kernel/time.c | 1 -
arch/x86_64/kernel/time.c | 1 -
6 files changed, 6 deletions(-)

--- linux-2.6.11-rc1-mm2-full/arch/i386/kernel/time.c.old 2005-01-20 19:00:34.000000000 +0100
+++ linux-2.6.11-rc1-mm2-full/arch/i386/kernel/time.c 2005-01-20 19:00:44.000000000 +0100
@@ -209,7 +209,6 @@

return pc;
}
-EXPORT_SYMBOL(profile_pc);
#endif

/*
--- linux-2.6.11-rc1-mm2-full/arch/sparc64/kernel/time.c.old 2005-01-20 19:00:52.000000000 +0100
+++ linux-2.6.11-rc1-mm2-full/arch/sparc64/kernel/time.c 2005-01-20 19:00:56.000000000 +0100
@@ -86,7 +86,6 @@
return regs->u_regs[UREG_RETPC];
return pc;
}
-EXPORT_SYMBOL(profile_pc);
#endif

static void tick_disable_protection(void)
--- linux-2.6.11-rc1-mm2-full/arch/arm/kernel/time.c.old 2005-01-20 19:01:05.000000000 +0100
+++ linux-2.6.11-rc1-mm2-full/arch/arm/kernel/time.c 2005-01-20 19:01:08.000000000 +0100
@@ -69,7 +69,6 @@

return pc;
}
-EXPORT_SYMBOL(profile_pc);
#endif

/*
--- linux-2.6.11-rc1-mm2-full/arch/ppc/kernel/time.c.old 2005-01-20 19:01:14.000000000 +0100
+++ linux-2.6.11-rc1-mm2-full/arch/ppc/kernel/time.c 2005-01-20 19:01:18.000000000 +0100
@@ -119,7 +119,6 @@

return pc;
}
-EXPORT_SYMBOL(profile_pc);
#endif

/*
--- linux-2.6.11-rc1-mm2-full/arch/ppc64/kernel/time.c.old 2005-01-20 19:01:25.000000000 +0100
+++ linux-2.6.11-rc1-mm2-full/arch/ppc64/kernel/time.c 2005-01-20 19:01:29.000000000 +0100
@@ -206,7 +206,6 @@

return pc;
}
-EXPORT_SYMBOL(profile_pc);
#endif

#ifdef CONFIG_PPC_ISERIES
--- linux-2.6.11-rc1-mm2-full/arch/x86_64/kernel/time.c.old 2005-01-20 19:01:36.000000000 +0100
+++ linux-2.6.11-rc1-mm2-full/arch/x86_64/kernel/time.c 2005-01-20 19:01:42.000000000 +0100
@@ -199,7 +199,6 @@
}
return pc;
}
-EXPORT_SYMBOL(profile_pc);

/*
* In order to set the CMOS clock precisely, set_rtc_mmss has to be called 500


2005-01-20 19:07:21

by William Lee Irwin III

[permalink] [raw]
Subject: Re: [RFC: 2.6 patch] unexport profile_pc

On Thu, Jan 20, 2005 at 07:20:19PM +0100, Adrian Bunk wrote:
> I haven't found any modular usage of profile_pc in the kernel.
> Is the patch below correct?
> Signed-off-by: Adrian Bunk <[email protected]>

In theory, /proc/ can be modular. In practice...


-- wli

2005-01-20 19:20:36

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: [RFC: 2.6 patch] unexport profile_pc

On Thu, 20 Jan 2005, Adrian Bunk wrote:

> I haven't found any modular usage of profile_pc in the kernel.
>
> Is the patch below correct?

Oprofile?

2005-01-20 19:39:46

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [RFC: 2.6 patch] unexport profile_pc

On Thu, Jan 20, 2005 at 10:59:17AM -0800, William Lee Irwin III wrote:
> On Thu, Jan 20, 2005 at 07:20:19PM +0100, Adrian Bunk wrote:
> > I haven't found any modular usage of profile_pc in the kernel.
> > Is the patch below correct?
> > Signed-off-by: Adrian Bunk <[email protected]>
>
> In theory, /proc/ can be modular. In practice...

Not even in theory.

2005-01-20 19:56:54

by William Lee Irwin III

[permalink] [raw]
Subject: Re: [RFC: 2.6 patch] unexport profile_pc

On Thu, Jan 20, 2005 at 10:59:17AM -0800, William Lee Irwin III wrote:
>> In theory, /proc/ can be modular. In practice...

On Thu, Jan 20, 2005 at 07:39:38PM +0000, Christoph Hellwig wrote:
> Not even in theory.

I have vague recollections of modular /proc/ "fixes" being posted.
I don't have any vested (or other) interest in the thing being modular
and generally avoid modules altogether myself. fs/Kconfig of course
reveals that this "option" has since been removed, to my complete
indifference.


-- wli

2005-01-20 21:14:42

by John Levon

[permalink] [raw]
Subject: Re: [RFC: 2.6 patch] unexport profile_pc

On Thu, Jan 20, 2005 at 12:16:52PM -0700, Zwane Mwaikambo wrote:

> > I haven't found any modular usage of profile_pc in the kernel.
>
> Oprofile?

We don't actually use it, but it looks like maybe we should? It seems
unfortunate that readprofile and OProfile should disagree here.

john

2005-01-21 21:48:28

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: [RFC: 2.6 patch] unexport profile_pc

On Thu, 20 Jan 2005, John Levon wrote:

> On Thu, Jan 20, 2005 at 12:16:52PM -0700, Zwane Mwaikambo wrote:
>
> > > I haven't found any modular usage of profile_pc in the kernel.
> >
> > Oprofile?
>
> We don't actually use it, but it looks like maybe we should? It seems
> unfortunate that readprofile and OProfile should disagree here.

We really should be using it otherwise you get profile hits in the
spin_lock functions, which isn't really helpful. I recall sending patches
for this, i may have to resend.