Article ID: 000088888 Content Type: Maintenance & Performance Last Reviewed: 12/17/2021

Unable to See Enclave Functions in Hotspots Reported by Intel® VTune™ Profiler

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

How to capture hotspots within enclaves using the Intel® VTune™ command line

Description
  • Ran Intel® VTune™ Profiler with:
    $ export INTEL_LIBITTNOTIFY64=/opt/intel/oneapi/vtune/latest/lib64/runtime/libittnotify_collector.so
    $ ./vtune -collect sgx-hotspots -collect-with runss -target-pid <pid>
  • Enclave functions do not show up in the Intel® VTune™ Profiler summary report.
Resolution

Enclaves are compiled as static shared libraries with an untrusted application and run as separate threads within the application's process. The hotspots report from Intel® VTune™ shows the functions in the overall application that take the most time to execute or use the most resources. You may not see enclave functions because enclaves are typically lightweight by design. Other functions from the application show up in the hotspots report because they take more CPU cycles to execute.

  • Use the sgx-hotspots analysis type in the Intel® VTune™ command line to profile enclaves.
  • To capture enclave functions that run quickly, shorten the sampling interval using the sampling-interval knob.
    $ vtune -collect sgx-hotspots -knob sampling-interval=.01 ./app
  • If using Intel® VTune™ from the command line only, generate comma-separated values (CSV) versions of various reports by running:
    $ vtune -report <reportname> -format=csv
  • Use vtune -help report to find available report names, for example, callstacks, hotspots, top-down.
  • To see data from the enclave only, run:
    $ vtune -report hotspots -format=csv -filter module=enclave.signed.so

Related Products

This article applies to 1 products