Skip to content
Michael Goldstein edited this page Aug 7, 2020 · 3 revisions

Table of Contents generated with DocToc

X86TraceGeneration

Introduction

MacSim supports x86-ISA simulations. Although both single-threaded/multi-threaded applications are runnable, but the correct execution for multi-threaded applications are not guaranteed due to the lack of cache coherence protocol in MacSim.

We use PIN [http://www.pintool.org], a binary instrumentation tool, as a frontend emulator. We provide a pintool, called x86 trace generator, in MacSim repository (macsim_repo/tools/x86_trace_generator).

Please note that our trace generator may not be backward/forward compatible with different PIN versions. Currently, PIN 98189 revision (March 25, 2020) must be used. For older versions of macsim, please try to use PIN 41150 revision (June 07, 2011) or PIN 56759 revision (January 20, 2013).

How to build the trace generator

  1. Download PIN
  2. Modify makefile of trace_generator to set up pintool path * search PIN_HOME, PIN_ROOT, and PIN_KIT * modify these according to your PIN path
  3. Build trace generator
$MACSIM/tools/x86_trace_generator$ make

How to generate a trace

  • Assuming you have a binary 'BIN' and a command to run 'BIN' is 'BIN arg1 arg2'
  • Assuming pin binary is available or you need to use appropriate path (Usually, pin binary path is in $PINTOOL/pin
  • Execute x86 trace generator with PIN
pin -t $MACSIM/tools/x86_trace_generator/obj-intel64/trace_generator.so -- BIN arg1 arg2

Other options

  • -trace: trace name
  • -skip: how many instructions to skip until the beginning of the trace generation
  • -max: maximum number of instructions to generate
  • -thread: number of threads to run

Outcome

trace.txt // trace information file
trace_0.raw // gzipped trace file for thread 0

Trace Generation From Ocelot

Introduction

To run GPU traces, you have to use Ocelot to generate traces. GPUOcelot provides many applications from different suites (CUDA SDK, Rodinia, Parboil).

The instruction is here


External Trace Distribution

Temporarily GPU traces

link