StanfordLegion/legion

profiler: record the git hash to the log files to avoid errors when using the wrong version of the profiler

Closed this issue · 7 comments

I have seen people complain about having errors when parsing log files. Some of the errors are just because the version of the legion does not match the version of the profiler. I am thinking if we can use a new logging statement to record the git hash of the Legion where the logs are generated, and then the rust/python profiler will just check wether the hash from the log files matches with the current one. If not, we just warn people.
@lightsighter @elliottslaughter Let me know what do you think?

I've asked before for the profiler to include the commit hash in its version number instead of 0.1.0 but I don't think I opened an issue for it.

This approach is sound but overly conservative. There are many times when the Legion logging format does not change between commits and we'll be essentially rejecting anything that is not an exact match.

It would require some discipline, but we could use a version number. Nothing fancy, just an integer we increment on each log format change. Then version differences correspond to actual incompatibilities. But everyone who touches Legion Prof will need to remember to increment it with each change, which might be easy to forget.

At least on the Legion side I can remember and enforce it on code reviews. I agree a version number is a more sane way to do this than a commit hash. We'll need to start with different version numbers of master and control_replication.

OK, I will assign this issue to myself. @lightsighter why do we need different numbers for master and control replication? I thought the logging statements are the same in these two branches, aren't they?

I think the Legion Prof logging statements are the same, but Legion Prof is now also parsing Legion Spy logging statements also and there are differences between those in master and control replication. At least I notice whenever I change the Legion Spy logging format, then Legion Prof tends to get unhappy, and I know those are different between the two branches.

Merged now.