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

Remove duplicate adjacent lines #3

Closed
ndmitchell opened this issue Nov 18, 2015 · 5 comments
Closed

Remove duplicate adjacent lines #3

ndmitchell opened this issue Nov 18, 2015 · 5 comments

Comments

@ndmitchell
Copy link
Contributor

Currently, running gcc -c main.c, I get 139 lines output from fsatrace. If I remove all lines which are identical to the previous line, I'm left with 15. Reducing the number of lines by a factor of 10 results in less storage, and less requirement for processing downstream. This will probably help with ndmitchell/shake#334

@ndmitchell
Copy link
Contributor Author

Removing all duplicates would be one approach, just omitting adjacent duplicates is probably simpler, guarantees to lose less information, and gives most of the gains.

@jacereda
Copy link
Owner

I'll probably refactor the whole thing to have a common frontend for windows/unix and implement it there. Probably as a flag, since I think clang behaves better.

@ndmitchell
Copy link
Contributor Author

What are the reasons you might want duplicate adjacent lines? Do they communicate real information?

If you're going for a flag, and it's easy, Shake really only wants each line once, removing all duplicates, adjacent or not - but certainly Shake can do that on it's side.

@jacereda
Copy link
Owner

Now -- should emit with dups removed and --- should emit the whole thing.

The raw output can be useful to debug fsatrace and to detect strange behaviour I guess.

@ndmitchell
Copy link
Contributor Author

Confirmed, that's a lot more manageable. Thanks.

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

No branches or pull requests

2 participants