If a profiler doesn't cut it, you might want to look at dtrace support in perl (if you platform supports it), maybe you can generate call graphs with it somehow.
Anyway, this looks like an XY Problem to me - what's your ultimate goal?
Comment on Re: Subroutine Call Stack - For Entire Program