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

trigger-trace-marker-hist.tc (546B)


      1#!/bin/sh
      2# SPDX-License-Identifier: GPL-2.0
      3# description: trace_marker trigger - test histogram trigger
      4# requires: set_event events/ftrace/print/trigger events/ftrace/print/hist
      5# flags: instance
      6
      7fail() { #msg
      8    echo $1
      9    exit_fail
     10}
     11
     12echo "Test histogram trace_marker trigger"
     13
     14echo 'hist:keys=common_pid' > events/ftrace/print/trigger
     15for i in `seq 1 10` ; do echo "hello" > trace_marker; done
     16grep 'hitcount: *10$' events/ftrace/print/hist > /dev/null || \
     17    fail "hist trigger did not trigger correct times on trace_marker"
     18
     19exit 0