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
16MAX_LOOP=1500
17count=0
18
19
20while true; do
21	count=$(( $count + 1 ))
22	i=0
23	while [ $i -lt $MAX_LOOP ]; do
24		echo 0 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
25		echo 1 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
26		i=$((i + 1))
27	done
28
29	enable=$(( $count % 3 ))
30
31	if [ $enable -eq 0 ]; then
32		echo 1 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
33	else
34		echo 0 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
35	fi
36
37	sleep 1
38done
39