Skip to content
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

feat: Add SymCache Transformers (NATIVE-463) #496

Merged
merged 2 commits into from
Feb 23, 2022

Conversation

Swatinem
Copy link
Member

@Swatinem Swatinem commented Feb 2, 2022

These allow transforming the function and source location records that
will be written into SymCaches.

fixes #422

@Swatinem
Copy link
Member Author

Swatinem commented Feb 2, 2022

grafik

@codecov-commenter
Copy link

codecov-commenter commented Feb 2, 2022

Codecov Report

Merging #496 (0149920) into master (5df576d) will increase coverage by 0.22%.
The diff coverage is 93.29%.

❗ Current head 0149920 differs from pull request most recent head b40787f. Consider uploading reports for the commit b40787f to get more accurate results

@@            Coverage Diff             @@
##           master     #496      +/-   ##
==========================================
+ Coverage   68.62%   68.85%   +0.22%     
==========================================
  Files          83       84       +1     
  Lines       17365    17472     +107     
==========================================
+ Hits        11917    12030     +113     
+ Misses       5448     5442       -6     

@Swatinem Swatinem marked this pull request as ready for review February 3, 2022 11:44
@Swatinem Swatinem requested a review from a team February 3, 2022 11:44
@Swatinem Swatinem changed the title feat: Add SymCache Transformers feat: Add SymCache Transformers (NATIVE-463) Feb 3, 2022
Copy link
Contributor

@flub flub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks largely fine. I wonder if the transformers also need to be able to change the symcache header so that e.g. you can distinguish one that's been transformed by a BCSymbolMap transformer and one that is not.

symbolic-symcache/src/new/transform.rs Show resolved Hide resolved
symbolic-symcache/tests/test_writer.rs Show resolved Hide resolved
These allow transforming the function and source location records that
will be written into SymCaches.
Comment on lines -70 to +88
fn insert_string(&mut self, s: &str) -> u32 {
fn insert_string(
string_bytes: &mut Vec<u8>,
strings: &mut HashMap<String, u32>,
s: &str,
) -> u32 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is some sort of borrow checker dance?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, since I can’t borrow all of self :-(

@Swatinem Swatinem merged commit bebd19b into master Feb 23, 2022
@Swatinem Swatinem deleted the feat/transform-symcache branch February 23, 2022 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow file name substitutions when generating symcache files
4 participants