diff --git a/pin_tracing/ImemROI/ImemInscount.cpp b/pin_tracing/ImemInscount.cpp similarity index 100% rename from pin_tracing/ImemROI/ImemInscount.cpp rename to pin_tracing/ImemInscount.cpp diff --git a/pin_tracing/ImemROI/makefile b/pin_tracing/ImemROI/makefile deleted file mode 100755 index 78811f2..0000000 --- a/pin_tracing/ImemROI/makefile +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (C) 2004-2013 Intel Corporation. -# SPDX-License-Identifier: MIT -# - -############################################################## -# -# DO NOT EDIT THIS FILE! -# -############################################################## - -# If the tool is built out of the kit, PIN_ROOT must be specified in the make invocation and point to the kit root. -ifdef PIN_ROOT -CONFIG_ROOT := $(PIN_ROOT)/source/tools/Config -else -CONFIG_ROOT := ../Config -endif -include $(CONFIG_ROOT)/makefile.config -include makefile.rules -include $(TOOLS_ROOT)/Config/makefile.default.rules - -############################################################## -# -# DO NOT EDIT THIS FILE! -# -############################################################## diff --git a/pin_tracing/ImemROI/makefile.rules b/pin_tracing/ImemROI/makefile.rules deleted file mode 100755 index d4190ab..0000000 --- a/pin_tracing/ImemROI/makefile.rules +++ /dev/null @@ -1,85 +0,0 @@ -# -# Copyright (C) 2012-2020 Intel Corporation. -# SPDX-License-Identifier: MIT -# - -############################################################## -# -# This file includes all the test targets as well as all the -# non-default build rules and test recipes. -# -############################################################## - - -############################################################## -# -# Test targets -# -############################################################## - -###### Place all generic definitions here ###### - -# This defines tests which run tools of the same name. This is simply for convenience to avoid -# defining the test name twice (once in TOOL_ROOTS and again in TEST_ROOTS). -# Tests defined here should not be defined in TOOL_ROOTS and TEST_ROOTS. -TEST_TOOL_ROOTS := ImemROIThreads ImemROIThreadsRange ImemInscount - -# This defines the tests to be run that were not already defined in TEST_TOOL_ROOTS. -TEST_ROOTS := - -# This defines the tools which will be run during the the tests, and were not already defined in -# TEST_TOOL_ROOTS. -TOOL_ROOTS := - -# This defines the static analysis tools which will be run during the the tests. They should not -# be defined in TEST_TOOL_ROOTS. If a test with the same name exists, it should be defined in -# TEST_ROOTS. -# Note: Static analysis tools are in fact executables linked with the Pin Static Analysis Library. -# This library provides a subset of the Pin APIs which allows the tool to perform static analysis -# of an application or dll. Pin itself is not used when this tool runs. -SA_TOOL_ROOTS := - -# This defines all the applications that will be run during the tests. -APP_ROOTS := - -# This defines any additional object files that need to be compiled. -OBJECT_ROOTS := - -# This defines any additional dlls (shared objects), other than the pintools, that need to be compiled. -DLL_ROOTS := - -# This defines any static libraries (archives), that need to be built. -LIB_ROOTS := - -###### Handle exceptions here (OS/arch related) ###### - -RUNNABLE_TESTS := $(TEST_TOOL_ROOTS) $(TEST_ROOTS) - -###### Handle exceptions here (bugs related) ###### - -###### Define the sanity subset ###### - -# This defines the list of tests that should run in sanity. It should include all the tests listed in -# TEST_TOOL_ROOTS and TEST_ROOTS excluding only unstable tests. -SANITY_SUBSET := $(TEST_TOOL_ROOTS) $(TEST_ROOTS) - - -############################################################## -# -# Test recipes -# -############################################################## - -# This section contains recipes for tests other than the default. -# See makefile.default.rules for the default test rules. -# All tests in this section should adhere to the naming convention: .test - - -############################################################## -# -# Build rules -# -############################################################## - -# This section contains the build rules for all binaries that have special build rules. -# See makefile.default.rules for the default build rules. diff --git a/pin_tracing/ImemROI/ImemROIThreads.cpp b/pin_tracing/ImemROIThreads.cpp similarity index 100% rename from pin_tracing/ImemROI/ImemROIThreads.cpp rename to pin_tracing/ImemROIThreads.cpp diff --git a/pin_tracing/ImemROI/ImemROIThreadsRange.cpp b/pin_tracing/ImemROIThreadsRange.cpp similarity index 100% rename from pin_tracing/ImemROI/ImemROIThreadsRange.cpp rename to pin_tracing/ImemROIThreadsRange.cpp diff --git a/pin_tracing/README.md b/pin_tracing/README.md index cfe4826..fcded12 100644 --- a/pin_tracing/README.md +++ b/pin_tracing/README.md @@ -12,21 +12,9 @@ module load gcc #or make sure you have gcc. Tested with 9.4.0 and 11.3.0 tar zxvf -export PIN_DIR= # full path +export PIN_ROOT= # full path -cp -rv pin_tracing/ImemROI $PIN_DIR/source/tools - -cd $PIN_DIR/source/tools - -#add ImemROI to the list of clients in makefile -vim makefile - -#Compile clients. Some clients may not compile, that is OK. -make -j - -#check that clients compiled: -ls -al $PIN_DIR/source/tools/ImemROI/obj-intel64/*.so -make -j +make ``` There are three clients. You can run your application with multiple threads and multiple processes (ranks), but only process 0 with thread 0 will be used. *** NOTE *** make sure you gzip the trace before using gs_patterns. @@ -55,8 +43,8 @@ For ImemROIThreadsRange, I first like to use ImemInscount to get the total numbe Example: ``` -$PIN_DIR/pin -t $PIN_DIR/source/tools/ImemROI/obj-intel64/ImemInscount.so -- ./hello -$PIN_DIR/pin -t $PIN_DIR/source/tools/ImemROI/obj-intel64/ImemROIThreadsRange.so -- ./hello -$PIN_DIR/pin -t $PIN_DIR/source/tools/ImemROI/obj-intel64/ImemROIThreads.so -- ./hello +$PIN_ROOT/pin -t obj-intel64/ImemInscount.so -- ./hello +$PIN_ROOT/pin -t obj-intel64/ImemROIThreadsRange.so -- ./hello +$PIN_ROOT/pin -t obj-intel64/ImemROIThreads.so -- ./hello gzip roitrace.bin ``` diff --git a/pin_tracing/makefile b/pin_tracing/makefile new file mode 100755 index 0000000..d7463a8 --- /dev/null +++ b/pin_tracing/makefile @@ -0,0 +1,5 @@ +CONFIG_ROOT := $(PIN_ROOT)/source/tools/Config +TOOL_ROOTS := ImemInscount ImemROIThreads ImemROIThreadsRange + +include $(CONFIG_ROOT)/makefile.config +include $(TOOLS_ROOT)/Config/makefile.default.rules