4 ms·
A profiler will often reveal an interesting cross-section of the code that you can read first. Any way to get a stack trace can be a rudimentary profiler, just
by andrewf 6y ago
A profiler will often reveal an interesting cross-section of the code that you can read first. Any way to get a stack trace can be a rudimentary profiler, just keep looking at stack traces until you see what comes up most commonly. If you've got good tools, you can get a map of the code you want to read first. Here is an old MySQL executing some queries: http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html#FlameGraph http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html#...
A debugger can also help. You can step through code as it runs. You can also often identify which code is associated with a feature, by putting breakpoints in likely places (dispatch functions!) and triggering the feature.