Re: [PATCH] pre-decoded wchan output

From: Christoph Hellwig (hch@infradead.org)
Date: Thu Oct 17 2002 - 14:58:03 EST


On Thu, Oct 17, 2002 at 03:14:02PM -0400, Robert Love wrote:
> Linus,
>
> Attached patch implements a /proc/#/wchan which provides a pre-decoded
> wchan via kallsyms. I.e.,
>
> [15:05:06]rml@phantasy:~$ cat /proc/1228/wchan
> wait4
>
> Which is damn cool to me and will let ps(1) grab wchan information
> without having to parse System.map. It also means procps will not need
> System.map.
>
> If CONFIG_KALLSYMS is enabled, /proc/#/wchan exists and exports the
> pre-decoded symbol name. The old wchan value in /proc/#/stat is
> hard-coded to zero.
>
> If CONFIG_KALLSYMS is not enabled, /proc/#/wchan does not exist to
> conserve memory. In that case, the old wchan field in /proc/#/stat will
> export the usual wchan address.
>
> This will not break procps, however the wchan field will be zero without
> an updated version if CONFIG_KALLSYMS is set. That is fine as 2.5
> requires an updated procps anyhow. If CONFIG_KALLSYMS is not set,
> things are unchanged.

Can't you just left the old, nuerical one in even if CONFIG_KALLSYMS
ise set? One ifdef less and far less surprises..

-
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/



This archive was generated by hypermail 2b29 : Wed Oct 23 2002 - 22:00:36 EST