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

[osquery] Simple LRU cache implementation #5521

Closed
wants to merge 4 commits into from

Conversation

akindyakov
Copy link
Contributor

@akindyakov akindyakov commented Mar 13, 2019

Stack:
    :white_circle:  #5527 [osquery] Rename system:cpu target to system:cpu_topology  💛
    :white_circle:  #5519 [osquery] Implement even producer to trace syscalls {kill, setuid} and dump them to experimental events streaming registry  💚
    :white_circle:  #5520 [osquery] Helper function to read process cmdline from /proc/<pid>/cmdline on linux by PID  💚
    :black_circle:  #5521 [osquery] Simple LRU cache implementation  💚

Implementation based on std::unordered_map and std::list, without any
age-bits or any sort of optimisations. If later we realize we need something
more powerfull we will use some fancy OSS lib for it.

I need it as a cache of "hot" processes in syscall traicing. To read cmdline
from file in /proc/<pid>/cmdline less often and preserve cmdline or any other
info about process for the events that came when process is already gone.

Differential Revision: D14424352

Differential Revision: D14424352
Differential Version: 75298315
akindyakov and others added 3 commits March 13, 2019 08:06
Differential Revision: D14424352
Differential Version: 75307513
Summary:
Pull Request resolved: #5524

So let's get rid of the rest usecases of createError with message as an argument in order to remove it completely.

Reviewed By: jessek

Differential Revision: D14437933

fbshipit-source-id: acfb1a2a2a79e03d7cb650b305ee8ad3b6218d2a
Differential Revision: D14424352
Differential Version: 75376035
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed Automated label: Pull Request author has signed the osquery CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants