Skip to content
Snippets Groups Projects
Select Git revision
  • reconstruct_functions
  • master default
  • bolt-unused-functions
3 results

collect-uprobes.service

Blame
    • Andreas Ziegler's avatar
      c921f9af
      scripts: uprobe helpers and kernel patches · c921f9af
      Andreas Ziegler authored
      This change adds some helper scripts for uprobe enabling and
      disabling. The trigger_collector.py script checks all enabled
      uprobes and disables them if they were hit (and thus, in the
      soft-disabled state).
      
      As an optimization, the two kernel patches are added. 0001-*
      changes the trace_entry struct to allow more than 65k probes
      and makes disable_event a POST_TRIGGER event, which makes
      every event leave exactly one line in the trace output file.
      0002-* speeds up the process of inserting all uprobes (~160k
      events for the Ubuntu 18.04 web server VM) by removing an
      O(n) check for uniqueness - in our case, we know that all
      events have unique names.
      
      Lastly, the systemd service file hooks up enable_uprobes.py
      as early during boot as possible. The uprobes to be enabled
      need to reside at /etc/librarytrader/all_triggers. Note that
      inserting ~160k uprobes will take around 2 minutes and will
      block before reaching sysinit.target.
      
      After the uprobes have been enabled, another systemd service
      starts collect_uprobes.py, which scans the trace filesystem
      for soft-disabled uprobes and fully disables them, writing
      an entry into a log at /etc/librarytrader/collected_uprobes.
      c921f9af
      History
      scripts: uprobe helpers and kernel patches
      Andreas Ziegler authored
      This change adds some helper scripts for uprobe enabling and
      disabling. The trigger_collector.py script checks all enabled
      uprobes and disables them if they were hit (and thus, in the
      soft-disabled state).
      
      As an optimization, the two kernel patches are added. 0001-*
      changes the trace_entry struct to allow more than 65k probes
      and makes disable_event a POST_TRIGGER event, which makes
      every event leave exactly one line in the trace output file.
      0002-* speeds up the process of inserting all uprobes (~160k
      events for the Ubuntu 18.04 web server VM) by removing an
      O(n) check for uniqueness - in our case, we know that all
      events have unique names.
      
      Lastly, the systemd service file hooks up enable_uprobes.py
      as early during boot as possible. The uprobes to be enabled
      need to reside at /etc/librarytrader/all_triggers. Note that
      inserting ~160k uprobes will take around 2 minutes and will
      block before reaching sysinit.target.
      
      After the uprobes have been enabled, another systemd service
      starts collect_uprobes.py, which scans the trace filesystem
      for soft-disabled uprobes and fully disables them, writing
      an entry into a log at /etc/librarytrader/collected_uprobes.
    collect-uprobes.service 337 B