This is an archive of the discontinued LLVM Phabricator instance.

[LNT] Python 3 support: stable profile getFunctions output
ClosedPublic

Authored by thopre on Sep 30 2019, 6:55 AM.

Details

Summary

lnt profile getFunctions output depends on the iteration order of a
dictionary, which is an implementation detail up to Python 3.6
(included). The test tests/lnttool/Profile.py is thus unstable accross
architectures and Python versions. This commit adds a --sortkeys option
to the getFunctions command to sort the keys in the dictionary when
dumping it into json, thus allowing stable results of
tests/lnttool/Profile.py by using this option.

Diff Detail

Repository
rL LLVM

Event Timeline

thopre created this revision.Sep 30 2019, 6:55 AM
This revision is now accepted and ready to land.Oct 5 2019, 1:47 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 6 2019, 11:32 AM