jlfwong / speedscope

🔬 A fast, interactive web-based viewer for performance profiles.
https://www.speedscope.app
MIT License
5.59k stars 246 forks source link

Callgrind: Subposition compression and weight correction #423

Closed jlfwong closed 1 year ago

jlfwong commented 1 year ago

This fixes a number of bugs with callgrind import. Dealing with this file format is a big pain because the documentation on https://www.valgrind.org/docs/manual/cl-format.html doesn't contain enough examples to disambiguate some of the behaviour, and because there's a fundamental impedance mismatch between call-trees and call-graphs.

In any case, after this PR, the behavior of callgrind file import is much better. The file provided in #414 now imports correctly and, as far as I can tell, displays the same weights as what I see in KCacheGrind.

Some of the key changes:

Fixes #414

coveralls commented 1 year ago

Coverage Status

coverage: 42.032% (+0.09%) from 41.946% when pulling 9e64cfa0ed33ec75191edd4d2006943ee32d8168 on jlfwong/callgrind-subposition into 8da9088ec1c93fd5cd5e4b7e8ddf06f400317636 on main.