Open Goirad opened 1 month ago
Instead of aggregating everything already, wouldn't it be better to have some strace-style logging of every call and then do post-processing later?
That seems a lot harder, because the application's stdout/stderr is intermingled with the enclave runner's stdout/stderr. Also, the overhead of printing that is non-trivial, and would probably have to be opted into, while this atomic based aggregation is essentially zero-cost.
This PR has the enclave runner keep track about all of the usercalls that enclaves do over their lifetimes. This includes:
wait
s andsend
s, additional grouping by signal typeThe intended integration path is for consumers of this library to set up signal handling or some other mechanism to trigger collecting and logging the stats. The included formatting looks like this (from a web server enclave using async usercalls):
This is just an initial pass, I definitely need to add more robust and/or elegant logic related to the absolute number of usercalls and stringifying them.