jacereda / fsatrace

Filesystem access tracer
ISC License
78 stars 12 forks source link

[buffersize] Add optional flag for buffer size #40

Closed jayzhuang closed 3 years ago

jayzhuang commented 3 years ago

This enables users to optionally specify a larger buffer size in case size of trace output exceeds default. Also enables a use case, although not likely, where users want to limit memory footprint.

Also addressed compiler warning, updated make clean to catch everything, and bumped optimizations from O2 to O3.

Test: make test

jayzhuang commented 3 years ago

Note for the PATH hack, I was only able to test it in Linux, since I don't have access to a Windows environment.

Also on a side note, I had some trouble aligning things while changing some of the files, if you don't mind I'm happy to clang-format everything and set up a make format target to automate that in the future.

jacereda commented 3 years ago

Nice.

Don't worry about format. I use clang-format myself everywhere nowadays, I'll bring my setup at some point.

jacereda commented 3 years ago

Built on Windows and seems to work.

jayzhuang commented 3 years ago

Thanks for testing on Windows! I squashed everything into one commit, PTAL.

charmoniumQ commented 5 months ago

Out of curiosity, why was the feature to set buffer size removed in eb296885 (appearing in v0.0.5)?

Is this line of the README out-of-date or is customize-buffer-size intended to work but does not work currently?

jacereda commented 4 months ago

Sorry for the delay.

Can't remember the exact details, but yes, the README is wrong now. I don't have a use for the dynamic size myself, all the commands I trace fit in 16MB. If you need more just change the LOGSZ value in fsatrace.h.

I think Google has a fork of this tool with more features, maybe you can try it. Maybe @jayzhuang has more details about that one?