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