Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5105 Discussions

SGX call stack collection / analysis

ginzberg__yehonatan
2,012 Views

Hi,

I'm perf analyzing SGX, I used hotspots to improve performance of functions in my code and got to a point where high hitters are "system" calls (i.e. _intel_avx_rep_memcpy, malloc, memchr, _intel_avx_rep_memset, free, etc.).

I believe that using stack informaiton VTune will build a meaningful Top-down tree which will allow me to capture whether there are blocks in my code that are calling "system" calls intensively.

Is there a way to enable call stack collection for SGX analysis? or other methods that will allow me to have a meaningful top-down tree?

0 Kudos
1 Solution
Dmitry_R_Intel1
Employee
2,012 Views

You can find the supported OSes in release notes: https://software.intel.com/en-us/articles/intel-vtune-amplifier-release-notes

At this point we can't provide any ETA.

View solution in original post

0 Kudos
10 Replies
Dmitry_R_Intel1
Employee
2,012 Views

You can try the following:

1. Copy the 'SGX Hotspots' analysis type

2. In the appeared custom analysis check 'Collect Stacks' option

3. Run your analysis

4. In the opened result change viewpoint (using control at the top) from 'Hardware Events' to 'Hotspots'

Note that this method wasn't tested so no guarantee it will work correctly.

0 Kudos
ginzberg__yehonatan
2,012 Views

Hi Dmitry, I tried that and VTune reports issues with vtss driver.

I tried to work with VTune 2016 Update 4, 2018 Update 1 and 2018 Update 3. Please note that I'm aware that SGX hotspots is broken in 2018 Update 3 (per our previous conversation). I tried it just to see if there is some issue with my OS that requires latest VTune bits.

VTSS Driver installation fails, event viewer reports "The vtss service failed to start due to the following error: %%4294967290" - seems to translate to error code -6 under twos-complement. I couldn't find explanation to this error that could help me work around the issue.

Can you assist?

0 Kudos
ginzberg__yehonatan
2,012 Views

Attaching VTSS installation error files and machine information 

0 Kudos
Dmitry_R_Intel1
Employee
2,012 Views

Hi Yehonatan,

Unfortunately VTune vtss doesn't support Windows 10 RS4 yet. This will be enabled in future updates.

0 Kudos
ginzberg__yehonatan
2,012 Views

:(

Where can I see VTune support matrix? The problem with Windows 10 is that it auto-updates and I couldn't find a way to stop it from doing so..

Any ETA for when it'd be supported?

0 Kudos
Dmitry_R_Intel1
Employee
2,013 Views

You can find the supported OSes in release notes: https://software.intel.com/en-us/articles/intel-vtune-amplifier-release-notes

At this point we can't provide any ETA.

0 Kudos
ginzberg__yehonatan
2,012 Views

Thanks,

Regarding VTune 2016 - the release notes doesn't say which Windows10 Versions are supported

https://software.intel.com/sites/default/files/managed/d8/4a/release_notes_amplifier_windows.pdf

 

Can you tell?

0 Kudos
Dmitry_R_Intel1
Employee
2,012 Views

It does. E.g. for 2016 Update 2:

"Support for the Microsoft Windows* 10 November update "

The 2016 line is quite old and it supports only early versions of Windows 10.

0 Kudos
ginzberg__yehonatan
2,012 Views

You are right, the release notes for Update 2 give some hints, I didn't look into them as I'm using Update 4 whose release notes do not mention supported version of Windows 10.

I guess that "November Update" refers to Version 1511 which is too old for me, I'll try to work with VTune 2018 Update 1 and RS2, will contact you if I encounter any issues.

Thank you for your assistance.

0 Kudos
ginzberg__yehonatan
2,012 Views

Dmitry Ryabtsev (Intel) wrote:

You can try the following:

1. Copy the 'SGX Hotspots' analysis type

2. In the appeared custom analysis check 'Collect Stacks' option

3. Run your analysis

4. In the opened result change viewpoint (using control at the top) from 'Hardware Events' to 'Hotspots'

Note that this method wasn't tested so no guarantee it will work correctly.

For the sake of completeness - after having an environment which fully supports SGX, attempting to follow the above instructions produced a call-graph up to the ecall. All the frames within the enclave are available but are being laid flat under the ecall (I guess call stack collection doesn't work within the enclave). 

0 Kudos
Reply