I wish to print the call stacks of all the cpus. at a given time. How can i do it?

for_each_cpu{
dump_stack() -> Some function like this available? or i should write my own code?
...
}

Any pointers would help.

Thank you,
Sandeep