Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dynamorio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,467
    • Issues 1,467
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynamoRIO
  • dynamorio
  • Merge requests
  • !5439

i#5427 compress: Add snappy output to drmemtrace offline raw files

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Derek Bruening requested to merge i5427-snappy-raw into master Mar 30, 2022
  • Overview 6
  • Commits 3
  • Pipelines 0
  • Changes 17

Adds support for compressing drmemtrace offline raw trace files with snappy as they are written out by the tracer.

Adds a new option -raw_compress which can select either "none" or "snappy" to control this behavior.

Implements this by adding a snappy_file_writer_t class which assumes small buffers and avoids unsafe operations for statically-linked operation. Since libsnappy contains un-parameterized allocations, and overriding the default operator new is unsafe, this means that snappy compression is incompatible with statically linked drmemtrace and the DR checks for unsafe behavior are suspended with a warning if enabled for a static build.

For post-processing, adds an istream wrapper around the existing snappy_file_reader_t for use by raw2trace.

Since snappy compression is slower than no compression for an SSD, compression is off by default. Adds a sanity check of setting the raw compression to "snappy".

Potential future work for this issue includes adding compression to the data sent over pipes for online drmemtrace, and adding compression to the smaller tracing client samples, but given the higher overhead those are not high priority.

Issue: #5427

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: i5427-snappy-raw