I want to profile a fairly large java program dynamically. More specifically, I want to generate a dynamic call graph for one run of the program. Is there a commandline profiler to generate such graph.
Thank you.
I think you should try btrace, which is a diagnose tool for Java programs. You can get enough information from the wiki page, and a lot of examples too.
JProfiler can generate call graphs:

You can profile without using the JProfiler GUI, either by defining triggers or using the jpcontroller command line utility. Afterwards, you can open a snapshot in the JProfiler GUI to look at the call graph.
Disclaimer: My company develops JProfiler.