DataDog / lading

A suite of data generation and load testing tools
MIT License
76 stars 11 forks source link

Improve smaps parsing support #942

Closed scottopell closed 3 weeks ago

scottopell commented 3 weeks ago

What does this PR do?

This fixes 2 bugs in the smaps parsing logic and makes 1 simplification.

  1. Simpler method of reading smaps to a string, the size-hinting should be done by stdlib
  2. A smaps region (VMA) can have varying hex address lengths, this was not properly accounted for
  3. The logic to split an smaps file into individual memory regions (VMAs) needs to only match address-range looking things that appear at the beginning of the line.

Motivation

Inaccurate /proc/[pid]/smaps data.

Related issues

Additional Notes