Provide a tool to diff two traces from the same program
Having something that provides a quick comparison between runs from the cli would be a boon.
Hi, yes this is on the list of things I would like to do one day, but would not the time to do myself now and for sure not in the coming months.
But if ever you have time or know someone who have I will be more than happy to help to discuss how to do it.
I might give it a try :)
If you like JS codes that should be a nice entry point in MALT and if you need some local helps I can do without too much issues.
If you want to discuss the basic design defining what you would like and mix with what I had in my head we can discuss a bit and see how to make a milestone with a list of tasks to proceed after looking a bit the code potions we can fix in a branch.
I know some javascript but it isn't my first language.
Probably getting something that takes a json and outputs the global statistics should be a good starting point :)
(My inspiration is something like critcmp)
Hi,
that's something I was thinking we can do easily as a first step. Taking two .json file. Compute the diff and build a thirst one replacing the absolute value by the diff. That might have some side effects in the GUI with negative numbers but that should make a first step easily if you want to make a first try.
If we see we loose the absolute infos which are still interesting we can still make next step by also keeping value of run 1 and 2 aside the diff as we can add metrics easily for this case.
Eg: allocCountDiff allocCountRef allocCountCanged (maybe another name than changed).
Then we can see what is missing a continue. Maybe it will ask some questions for the charts but we can for sure do a usefull simple code going like this.
This can be done in NodeJS if you want to reuse the MaltProject.js. Or if ever you prefer the file format is easy enougth so you might also be able to do in Python or similar, I don't see blockers for this case even if I would prefer JS to reuse some common functions, but you might use so many at least first.
There is a start of spec for the JSON file but if you need I can finish it, I forgot I stopped making it : https://github.com/memtt/malt/blob/master/src/doc/file-format.md.
If ever you want to give a look on this, I tried to finish documenting a bit the JSON file format so you can look mostly on this page and also using a JSON exemple to play totaly outside of MALT if you want to make a simple script.
https://github.com/memtt/malt/blob/master/src/doc/file-format.md
Thank you a lot :) malt had been quite precious in fixing some annoying memory usage issues in rav1e, hopefully I'll try to get something going in the future (I got busy with other tasks as well)
Ok, thanks for the news, if ever you have time do not hesitate, I will see if I can do a first POC but not for next version, I'm already a little bit late to make out the 1.1.0 and didn't had lot of time past weeks, might have more next ones.
If ever you have a small description of the kind of issues you found with the tools I will be happy to have feedback (if you have time). No need to 100 pages.
rav1e is an encoder and we had few tiny allocations in some hot paths, that was causing severe memory fragmentation in certain deploys. I used malt to track the worst offenders and get most if not all the hotpaths clear.
Thanks