Re: [RFC PATCH] explicitly mark recursion count
From: Jörn Engel
Date: Thu Jun 03 2004 - 02:31:46 EST
On Wed, 2 June 2004 16:20:24 -0700, Davide Libenzi wrote:
>
> Think at file_operations as very simple example, and try to find out what
> is actually called when somewhere the code does f_op->*(). How would you
> build the graph down there. You'd have to record all the functions that
> have been assigned to such method throughout the code, and nest *all*
> their graph in place. And this will eventually trigger false positives.
Bad example, I can deal with that just fine. :)
Any code calling f_op->read must not break for any f_op->read. So it
is perfectly sane to assume that all get called. I build the graph by
turning f_op->read into a pseudo-function that calls all functions
ever assigned to f_op->read.
> Similar thing with functions that accepts callbacks, either directly or
> inside structures.
Those I only handle, if the callbacks are inside structures, true.
Will fix it when I find the time for it.
> And this doesn't even start to take aliasing into
> account.
What exactly do you call aliasing? Do you have an example?
> Hunting stack hungry functions is very good, and having a tool
> that is maybe 60% precise in detecting loops is fine too. But requiring
> metadata to be maintained to support such tool is IMO wrong.
Since Linus feels that said metadata is still useful without any
tools, I'll just ignore this objection. ;)
Still, some of the complaints were valid, thanks a bunch! My todo
list has grown again.
Jörn
--
Write programs that do one thing and do it well. Write programs to work
together. Write programs to handle text streams, because that is a
universal interface.
-- Doug MacIlroy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/