-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More comprehensive and deterministic reporting #78
Conversation
@@ -22,11 +22,20 @@ | |||
struct odrv_report { | |||
odrv_report(std::string_view symbol, const die* list_head); | |||
|
|||
std::string category() const; | |||
std::size_t category_count() const { return _conflicting_attributes.size(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes reflect the increased complexity around ODRV category management.
@@ -67,41 +67,59 @@ std::string_view path_to_symbol(std::string_view path) { | |||
} | |||
|
|||
/**************************************************************************************************/ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes refactor find_attribute_conflict
to make it easier to understand.
const auto conflict_first = _conflict_map.begin(); | ||
const auto conflict_last = _conflict_map.end(); | ||
|
||
for (auto x = conflict_first; x != conflict_last; ++x) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of comparing just two entries in the conflict map, now we compare all of them to each other, collecting all the categories where they conflict along the way.
@fosterbrereton I checked the code with "deterministic output" in mind and didn't see any problems. But wanted to confirm that you've run this against our massive codebase and ORC still produces the same text with every run? |
I have not run this over our code base yet. I'll find some time to do that this upcoming week. |
@leethomason I have run this PR over our sources and am seeing the same output being produced from the same input over multiple runs of the tool. |
…do not have to re-fetch attributes for every die, but only the first in a fatal hash value bucket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - nice set of changes.
This PR includes a wide number of changes to improve the determinism and breadth of ODRV reporting. The reports are becoming quite dense, but that is purposeful to maximize a report's signal to noise ratio. To make it easier to explain what's all in here, let's break down a sample report:
Here are the most significant changes:
member:data_member_location, member:type
).