Skip to content

Instantly share code, notes, and snippets.

View leoadberg's full-sized avatar

Leo Adberg leoadberg

View GitHub Profile
@leoadberg
leoadberg / patch_vtune_for_m1.sh
Created July 13, 2022 20:43
Patches the VTune Profiler to run on M1 Macs when profiling remotely
#! /bin/bash -e
# Change these as needed for other VTune versions
VTUNE="/Applications/Intel VTune Profiler 2020.app"
TOPATCH=(
"$VTUNE/Contents/Frameworks/libamplxe_dpihelpers_1.42.dylib"
)
for FILE in "${TOPATCH[@]}"; do
# Get addresses of all xacquire or xrelease instructions in binary