Skip to content
Snippets Groups Projects

ProcStats : Use mutex lock to make fetch() thread safe.

Merged Christopher Rob Jones requested to merge jonrob/Gaudi:ProcStats-thread-safe into master

Whilst investigating a possible memory issue using the Memory Auditor, I discovered the information printed was garbled if multiple threads where used.

The issue was the ProcStats::fetch method which was not thread safe. This MR fixes that with a simple mutex lock.

I also did a drive-by cleanup and code modernisation.

FYI @clemenci

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    • b1c1a756 - ProcStats: simplify ProcStats::instance()

    Compare with previous version

  • added 1 commit

    • e321a6ae - ProcStats: Always use lock in fetch(...) as state is always updated

    Compare with previous version

  • Christopher Rob Jones resolved all threads

    resolved all threads

  • added 1 commit

    • 26890325 - ProcStats: Attempt to reconnection to process proc stat when information appeats corrupted

    Compare with previous version

  • added 1 commit

    • 8c0ae0cc - ProcStats: Attempt to reconnection to process proc stat when information appeats corrupted

    Compare with previous version

  • added 1 commit

    • a018d4bb - ProcStats: Attempt to reconnection to process proc stat when information appeats corrupted

    Compare with previous version

  • added 1 commit

    • 9929a45a - ProcStats: default init members of linux_proc struct

    Compare with previous version

  • added 1 commit

    • 0866141a - ProcStats: default init members of linux_proc struct

    Compare with previous version

  • added 1 commit

    • cd2fd388 - ProcStats: default init members of linux_proc struct

    Compare with previous version

  • added 1 commit

    • b8775b50 - ProcStats: default init members of linux_proc struct

    Compare with previous version

  • added 1 commit

    • 81204ee2 - ProcStats: default init members of linux_proc struct

    Compare with previous version

  • added 1 commit

    • f17c66bd - ProcStats: default init members of linux_proc struct

    Compare with previous version

  • added 1 commit

    • 214fc69f - ProcStats: default init members of linux_proc struct

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading