xref: /aosp_15_r20/external/ltp/testcases/kernel/tracing/ftrace_test/ftrace_stress/ftrace_trace_clock.sh (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1#! /bin/sh
2
3###############################################################################
4#                                                                             #
5# Copyright (c) 2010 FUJITSU LIMITED                                          #
6#                                                                             #
7# This program is free software; you can redistribute it and/or modify it     #
8# under the terms of the GNU General Public License as published by the Free  #
9# Software Foundation; either version 2 of the License, or (at your option)   #
10# any later version.                                                          #
11#                                                                             #
12# Author: Li Zefan <[email protected]>                                      #
13#                                                                             #
14###############################################################################
15
16LOOP=400
17
18while true; do
19	i=0
20	while [ $i -lt $LOOP ]; do
21		echo local > "$TRACING_PATH"/trace_clock
22		echo global > "$TRACING_PATH"/trace_clock
23		i=$((i + 1))
24	done
25	sleep 1
26done
27
28