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

[PAL/Linux-SGX] Print SGX stats on SIGUSR1 and reset them #1996

Merged
merged 1 commit into from
Sep 26, 2024

Commits on Sep 25, 2024

  1. [PAL/Linux-SGX] Print SGX stats on SIGUSR1 and reset them

    This commit adds support to dump and reset SGX-related statistics
    interactively, using SIGUSR1 signal. This helps to collect SGX-related
    statistics only for a particular period, e.g. skipping the Gramine
    startup and application initialization time and concentrating only on
    the actual application processing.
    
    The printed-out statistics are not precise, as the "stats collecting"
    thread may run in parallel with other threads that update the
    statistics. However, this imprecise implementation is simple and enough
    for perf analysis.
    
    This commit also breaks compatibility: SGX statistics can now only be
    collected and printed when Gramine is built in debug or debugoptimized
    mode. However, this should not affect users as SGX stats is tailored for
    manual debugging and profiling sessions.
    
    Co-authored-by: TejaswineeL <[email protected]>
    Signed-off-by: Dmitrii Kuvaiskii <[email protected]>
    Signed-off-by: TejaswineeL <[email protected]>
    Dmitrii Kuvaiskii and TejaswineeL committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    ceb2863 View commit details
    Browse the repository at this point in the history