I am looking for a way to count EPC hits and misses, and EPC paging.
For EPC paging I thought of counting the invocations of the EWB instruction. For that I placed a counter in:
static void sgx_evict_page(struct sgx_encl_page *entry, struct sgx_encl *encl)
Every invocation would equal to 4kB of data. Is that correct?
I actually tried it out and for an enclave that processed some data in 30s it showed me 6000MB of EPC paging. Could that really be the number?
I struggle to find a way to count EPC hits and misses. Is there a way to detect an EPC access?