• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 <lizf@cn.fujitsu.com>                                      #
13#                                                                             #
14###############################################################################
15
16while true; do
17	i=0
18	while [ $i -lt 100 ]; do
19		echo 1 > "$TRACING_PATH"/events/enable
20		echo 0 > "$TRACING_PATH"/events/enable
21		i=$((i + 1))
22	done
23
24	for dir in `ls $TRACING_PATH/events/`; do
25		if [ ! -d $dir -o "$dir" = ftrace ]; then
26			continue;
27		fi
28
29		i=0
30		while [ $i -lt 20 ]; do
31			echo 1 > "$TRACING_PATH"/events/$dir/enable
32			echo 0 > "$TRACING_PATH"/events/$dir/enable
33			i=$((i + 1))
34		done
35	done
36
37	for event in `cat $TRACING_PATH/available_events`; do
38		# ftrace event sys is special, skip it
39		if echo "$event" | grep "ftrace:*"; then
40			continue
41		fi
42		echo $event >> "$TRACING_PATH"/set_event
43	done
44
45	sleep 1
46done
47