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

TraceAEX segfault and TracePage did not record anything #2

Open
bronzeMe opened this issue Mar 27, 2019 · 1 comment
Open

TraceAEX segfault and TracePage did not record anything #2

bronzeMe opened this issue Mar 27, 2019 · 1 comment

Comments

@bronzeMe
Copy link

Hi envy,
I tried sgx-perf again.
firstly, I used sgx-perf to evaluate a sample enclave developed by Intel, i.e., SampleEnclave. The following is the config file (.sgxperf)
CountAEX=true TraceAEX=true CountPaging=true TracePaging=true
The result (e.g. output.db) contains ecall, ocall, AEX events, but without any page events. So, does sgx-perf supports TracePaging? In my view, there is at least EnlcavePaingEvent. I am not sure that "EnclavePaing Event" is 'malloc' (or 'free') event inside enclave.

second, I tried sgx-perf using my enclave application which is bigger (more complex) than the SampleEnclave. The .sgxper file is as the following:
CountAEX=true TraceAEX=true CountPaging=true TracePaging=true
However, sgx-perf raised segfault when load my enclave application. So, there may be bugs in TraceAEX.
Next, I re-writed a new .sgxperf as the following (deleted TracesAEX):
TracePaging=true
then sgx-perf worked well, but the result (output.db) only contains ecall,ocall events, still without any page events.

Could you give some advise, please?

@envy
Copy link
Member

envy commented Mar 29, 2019

Paging events happen when the enclave is bigger than EPC. The sample enclave from Intel is very small and fits into EPC as long as you don't reduce EPC size to something very small. That's why you don't see any events, if it's not paging, then no events.

Paging events do not record malloc/free inside the enclave, they record paging of the enclave.

There still might be some problems with AEX tracing. If you only need AEX count then just use CountAEX. That still tells you how many AEX happened during ecall execution. TraceAEX just also tells you when an AEX happened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants