Hi, Guys!
After having read of the stack "issues" awhile back, and then having an
idea or two gel in my head (it didn't hurt much ;-), I put them
together, and found that xfs_ioctl() is using 752 bytes of stack. I
chose 512 as the number of bytes above which to complain about, and
looking at the code, I'd guess that the var "vattr_t va" struct is the
main culprit.
This is just a caution, and things may be just fine, of course.
The ideas were:
1) with the KDB patch, you can compile the kernel with frame pointers.
2) within the "function prelude", the frame pointer has N bytes
subtracted from it. This is the amount of stack that the function uses,
plus some slop (perhaps).
3) there exists a module for Perl that can disassemble i386
instructions.
So, I have a Perl script that will accept vmlinux and System.map
arguments, and look at every function mentioned for the "sub esp,N"
within the first 10 instructions after the function beginning.
It's a heuristic, it's static, it only looks at functions compiled in,
and says nothing about the dynamic system, but can point out functions
that use large amounts of stack.
If you'd like the script, drop me an email....
--
kernel, n.: A part of an operating system that preserves the
medieval traditions of sorcery and black art.
Danny
|