# Intel® Software Development Emulator (Intel® SDE)

Published: 06/15/2012

Last Updated: 11/23/2021

## Product Overview

This emulator is called Intel® Software Development Emulator or Intel® SDE, for short.

The current version is 9.7 and was released on May 09, 2022. This version corresponds to the Intel® Architecture Instruction Set Extensions Programming Reference revision 319433-044 and the Intel® AVX512-FP16 Architecture Specification available on the Intel Instruction Set Architecture page. The Intel® SDE release notes are here. This major update release adds the capability to write binary instrumentation pin tools with Intel® SDE services.

Intel® SDE continues to support the features from previous releases:

• Emulation support for the additional Intel® Advanced Vector Extensions 512 (Intel® AVX-512) instructions present on some future Intel® processors.
• Emulation support for the Intel® Advanced Matrix Extensions (Intel® AMX) present on some future Intel® processors.
• Intel® Advanced Vector Extensions 512 (Intel® AVX-512) instructions present on Intel® processors.
• Intel® Streaming SIMD Extensions 4(Intel® SSE 4), AES and PCLMULQDQ and the Intel® Advanced Vector Extensions (Intel® AVX)
• Intel® AVX2, RTM, BMI1, and BMI2 instructions, being introduced on the 4th Generation Intel® Core™ processor family formerly known as Haswell microarchitecture.
• The ADOX/ADCX instructions, being introduced on the 5th Generation Intel® Core™ processor family formerly known as Broadwell microarchitecture.
• Support for the Intel® Secure Hash Algorithm (Intel® SHA) extensions present on the Intel® Atom™ processor formerly known as Goldmont microarchitecture.
• Support for the vector instructions for deep learning present on Intel® processors.

Related useful materials:

• More information about the Intel® SHA extension is available here and includes a sample test application.

Intel is releasing this Intel® SDE so that developers can gain familiarity with our upcoming instruction set extensions. Intel® SDE can help ensure software is ready to take advantage of the opportunities created by these new instructions in our processors. We hope that developers will explore the new instructions using the currently available compilers and assemblers.

Intel SDE is built upon the Pin dynamic binary instrumentation system and the XED encoder decoder. Pin controls the execution of an application. Pin examines each static instruction in the application approximately once, as it builds traces for execution. During this process, which is called instrumentation, for each instruction encountered Pin asks Intel® SDE if this instruction should be emulated or not. If the instruction is to be emulated, then Intel® SDE tells Pin to skip over that instruction and instead branch to the appropriate emulation routine. It also tells Pin how to invoke that emulation function, what arguments to pass, etc.

Intel SDE queries CPUID to figure out what features to emulate. It also modifies the output of CPUID so that compiled applications that check for the emulated features are told that those features exist.

Intel® SDE comes with several useful emulator-enabled Pin tools and the XED disassembler:

• The basic emulator
• The mix histogramming tool: This Pin tool can compute histograms by any of: dynamic instructions executed, instruction length, instruction category, and ISA extension grouping. This tool can also display the top N most frequently executed basic blocks and disassemble them.
• The debugtrace ASCII tracing tool: This versatile tool is useful for observing the dynamic behavior of your code. It prints the instructions executed, and also the registers written, memory read and written, etc.
• The footprint tool: This simple tool counts how many unique 64 byte chunks of data were referenced during the execution of the program.
• The XED command line tool which can disassemble PECOFF or ELF binary executables.

### Licensing

Intel SDE is provided and supported by Intel, free of charge for any type of use, under the terms of the Intel Simplified Software License (Version August 2021).

### Installation

Download and unpack the appropriate kit for your platform. Set your PATH variable to point to that directory. You can also refer to the tools in the kit using full or relative paths. Do not rearrange the files or subdirectories in the unpacked kit. If you want to move the kit directory, move everything.

Windows*: If you are using Winzip, it puts the proper permissions on the unpacked files. However, if you are using Cygwin's tar command to unpack the Windows* kit, you must execute a "chmod -R +x path-to-kit" on the unpacked kit (where "path-to-kit" is the unpacked kit directory name).

Linux*: On some distributions, you must disable "SE Linux" to allow Intel® SDE to work. On Ubuntu systems, you must disable yama as described below.

Mac*: Intel SDE is using the MACH taskport APIs. By default, when trying to use these APIs, user-authentication is required once per a GUI session. In order to allow PIN/SDE run without this authentication you need to disable it. This is done by configuring the machine to auto-confirm takeover of the process as described below.

### Running Intel® SDE

This is the pattern for running SDE:

path-to-kit/sde [sde args] -- user-application [app args]

The double dash ("--") is important. Options to SDE go before the double dash. Square brackets denote optional arguments.

Important options are the short and long help messages. To see the short help message:

path-to-kit/sde -help

And to see the very long help message:

path-to-kit/sde -long-help

In the help messages, the command line options are often displayed using underscores between words, but dashes may be used instead of underscores. Often the Intel® SDE help messages and this web page will refer to command line options as "knobs" for historical reasons. The short help message contains some top level analysis tools knobs as well as the list of supported CPUs.

### Emulate Everything Mode

• Windows*: A file called sde-win.bat is provided in Windows* that runs a cmd.exe window under the control of Intel® SDE. You can make a shortcut to it and place that shortcut on your desktop. Everything run from that window will be run under the control of Intel® SDE, so you may experience a slow down even when you are not emulating anything. All it really does is:
path-to-kit/sde -- cmd.exe
• OS X* or Linux*: You can run your favorite shell under the control of Intel® SDE:
path-to-kit/sde -- /bin/tcsh

And everything you run from there will be run under the control of Intel® SDE.

### Running the Histogram Tool

To generate the instruction mix histograms by opcode (XED iclass, the default) or instruction form (iform). As of version 4.29, the instruction length and instruction category histograms are always included.

path-to-kit/sde -mix -- user-application [args]
path-to-kit/sde -mix -iform -- user-application [args] 

#### Notes:

• The ISA extension histogram is also always computed and printed as star-prefixed rows in the histograms. ISA extensions are things like (BASE, X87, MMX, SSE, SSE2, SSE3, etc.). This is useful to see which instruction set extensions are used in your application.
• The dynamic statistics are recorded and emitted several ways: (1) per-thread, (2) per function per thread, and (3) summed for the entire run. Instruction counts by function are also emitted if symbols are found for the application.
• The output is written to a sde-mix-out.txt file in the current directory. The output file name can be changed using the -omix option:
path-to-kit/sde -mix -omix foo.out -- user-application [args]
• The top 20 basic blocks are always printed in the output with their execution weights.
• "-top_blocks N" will allow you to change 20 to N that you specifiy.
• Iforms: "Iform" is the XED term for variants of instructions. In a simple world they would be things like reg/reg or reg/mem, but things are more complicated in general. The iform names come from XED. Consider them experimental and subject to change. To see histograms by the more detailed iforms, use the "-iform" command line option.
• There are many command line options for the mix tool:
Mix knobs

-d  [default 0]
Only collect dynamic profile
-demangle  [default 1]
Control for attempting symbol demangling
-disas  [default 0]
Show disassembly for top blocks
-disas_at_jit  [default 0]
This knob does nothing anymore. DEPRECATED!
-dynamic_stats_per_block  [default 0]
Print dynamic stats per block
-dynamic_stats_per_loop  [default 0]
Print dynamic stats per loop
-function_call_counts  [default 1]
Collect number of times each function is called.
-global_functions  [default 1]
Print global functions report
-global_hot_blocks  [default 1]
Print global hot blocks
thread stats prints are ordered by Icount
-iform  [default 0]
Compute ISA iform mix
-line_info  [default 1]
Add line info to the top hot blocks
-map_all_blocks  [default 0]
Map all the blocks instead of only top blocks
Emit mappings: Address -> Source file and Line
Emit mappings for top blocks: Address -> Source file and Line
-mix  [default 0]
Compute mix histograms.
-mix_concat_bbls  [default 0]
Concatenate consecutive blocks statistics
-mix_filter_no_shared_libs  [default ]
Do not instrument shared libraries
-mix_filter_rtn
Routines to instrument
-mix_loops  [default 0]
Supply loops statistics
-mix_max_cumulative  [default 97]
specify maximum cumulative. stops printing functions when it reached max cumulative
-mix_omit_per_function_stats  [default 0]
Omit the per-function histograms. Reduces the output file size.
Omit per-thread stats for smaller output files
-mix_opt_report  [default 0]
Add optimization report messages to mix file
-mix_top_loops  [default 10]
specify maximum number of top loops for which statistics are printed,
sorted by iteration count
-mix_verbose  [default 0]
Add info messages to mix file
-mix_vpconflict  [default 0]
Add vconflic stats to mix file
-no_shared_libs  [default 0]
do not instrument shared libraries
-omix  [default sde-mix-out.txt]
specify profile file name
-s  [default 0]
terminate after collection of static profile for main image
-top_blocks  [default 20]
specify a maximal number of top blocks for which icounts are printed


Example

Command:

    % sde -mix -- mm_cmp.opt.vec.exe

Output: in sde-mix-out.txt (default file name)

    #

## Primary Technology Contact

Ady Tal: Ady is a senior software engineer in Intel Software and Services Group. Ady joined Intel in 1996. Ady works on emulation of new instructions in support of the compiler, architecture and the enabling teams.

1. Dump the security configuration of the machine into a file by:
 % security authorizationdb read system.privilege.taskport > /some/file
2. Edit this file and replace the following key/value from 'true' to 'false':
 <key>authenticate-user</key>
<true/>
3. Set the configuration back into the machine by:
 % sudo security authorizationdb write system.privilege.taskport < /some/file
4. Now the machine is ready.
• /System
• /usr
• /bin
• /sbin
• Apps that are pre-installed with OS X

## Related Content

Attachment Size
9 KB
4.5 KB

#### Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.