Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup(scap,sinsp): Clean up proc callback handling code #1471

Merged
merged 24 commits into from
Nov 10, 2023

Commits on Nov 10, 2023

  1. doc(scap): remove misleading comment

    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    94ac9db View commit details
    Browse the repository at this point in the history
  2. cleanup(scap): avoid allocations in scap_proc_scan_vtable

    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    b8cac94 View commit details
    Browse the repository at this point in the history
  3. cleanup(scap): handle allocations internally in scap_add_fd_to_proc_t…

    …able
    
    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    0dc920a View commit details
    Browse the repository at this point in the history
  4. cleanup(scap): inline scap_fd_scan_vtable

    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    ac864f0 View commit details
    Browse the repository at this point in the history
  5. cleanup(scap): delay allocations in scap_proc_add_from_proc

    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    f93c240 View commit details
    Browse the repository at this point in the history
  6. cleanup(scap): only touch the internal fdlist when proc callback is n…

    …ot set
    
    (in scap_fd_add_to_proc_table)
    
    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    10fea48 View commit details
    Browse the repository at this point in the history
  7. cleanup(scap): remove fdinfo alloc/free functions

    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    29b5367 View commit details
    Browse the repository at this point in the history
  8. cleanup(scap): extend proc_callback type for future expansion

    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    be1dd84 View commit details
    Browse the repository at this point in the history
  9. cleanup(scap): introduce default proc callback

    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    2aab28a View commit details
    Browse the repository at this point in the history
  10. cleanup(scap): introduce helper for initializing the proclist

    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    56c8f74 View commit details
    Browse the repository at this point in the history
  11. cleanup(scap): use default proc callback instead of NULL checks

    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    06e6c3c View commit details
    Browse the repository at this point in the history
  12. cleanup(scap): inline scap_add_fd_to_proc_table

    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    1147ab9 View commit details
    Browse the repository at this point in the history
  13. cleanup(scap): remove some unused includes

    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    2b05f1f View commit details
    Browse the repository at this point in the history
  14. cleanup(scap): flatten scap_proc_scan_vtable a bit

    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    b37a50a View commit details
    Browse the repository at this point in the history
  15. cleanup(scap): remove procinfo from scap_proc_add_from_proc

    This is effectively a special-case single-entry proclist
    
    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    84c5ddb View commit details
    Browse the repository at this point in the history
  16. cleanup(scap): remove proclist from scap_proc_read_thread

    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    17c3be9 View commit details
    Browse the repository at this point in the history
  17. cleanup(scap): remove proclist from vtable->get_proc

    It was always unclear (to me) what the proclist is used for, exactly.
    It turns out it's just a holder for the callback which was ignored
    in the previous implementation and now is replaced by a completely
    different temporary proclist.
    
    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    93ed318 View commit details
    Browse the repository at this point in the history
  18. cleanup(scap): remove scap_t from scap_proc_free

    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    7aa434c View commit details
    Browse the repository at this point in the history
  19. cleanup(scap): remove scap_t from scap_fd_add

    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    a0dfaad View commit details
    Browse the repository at this point in the history
  20. cleanup(scap): remove scap_proc_alloc

    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    f38a596 View commit details
    Browse the repository at this point in the history
  21. cleanup(scap,sinp): do not allocate scap_threadinfo for scap_proc_get

    We don't need a heap-allocated tinfo just to pass it to
    sinsp_threadinfo::init
    
    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    b5db5a0 View commit details
    Browse the repository at this point in the history
  22. cleanup(scap): remove scap_proc_free

    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    db81cce View commit details
    Browse the repository at this point in the history
  23. cleanup(scap): remove unused parameter from scap_fd_add

    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    14ef2c4 View commit details
    Browse the repository at this point in the history
  24. cleanup(scap): move scap_alloc_proclist_info to scap_procs.c

    Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
    gnosek committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    d440f43 View commit details
    Browse the repository at this point in the history