cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

add_remove_synth.tc (605B)


      1#!/bin/sh
      2# SPDX-License-Identifier: GPL-2.0
      3# description: Generic dynamic event - add/remove synthetic events
      4# requires: dynamic_events "s:[synthetic/]":README
      5
      6echo 0 > events/enable
      7echo > dynamic_events
      8
      9echo "s:latency1 u64 lat; pid_t pid;" >> dynamic_events
     10echo "s:latency2 u64 lat; pid_t pid;" >> dynamic_events
     11
     12grep -q latency1 dynamic_events
     13grep -q latency2 dynamic_events
     14test -d events/synthetic/latency1
     15test -d events/synthetic/latency2
     16
     17echo "-:synthetic/latency2" >> dynamic_events
     18
     19grep -q latency1 dynamic_events
     20! grep -q latency2 dynamic_events
     21
     22echo > dynamic_events
     23
     24clear_trace