Using flame graphs when profiling Java applications

preview_player
Показать описание
Flame graphs are a great way to get an overview of the entire call tree and to visualize performance characteristics. This screen cast shows how the jclasslib bytecode viewer is profiled. A class file is opened and the parsing of the class file is analyzed with the flame graph.

For jclasslib, see

Рекомендации по теме
Комментарии
Автор

Flame graphs are pretty. Period.
I can easily waste a lot of time that flame graphs would never see. It's easy. Be in a routine that's called 100 different times, or in 100 different places. In there, do something unnecessary, like making and deleting some object that could be re-used, or writing a line to some log file that nobody ever reads, or any of lots of other things. I'm wasting this time in lots of little slices that are sprinkled in tiny pieces throughout the flame graph. What's more, since flame graphs only show you functions, and I'm a line of code, and I'm in a function with an innocent-sounding name, you would never suspect me.
But, if I'm wasting 20% of your time, which I very well could be, you could expect to see me twice in 10 random stack traces.
But who cares about that, when you could collect a thousand and make a pretty picture?

michaeldunlavey