• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14on late-init
15    write /proc/sys/kernel/sched_schedstats 1
16
17    write /sys/kernel/debug/tracing/tracing_on 0
18    chmod 0666 /sys/kernel/debug/tracing/buffer_size_kb
19    chmod 0666 /sys/kernel/debug/tracing/saved_cmdlines_size
20    chmod 0666 /sys/kernel/debug/tracing/trace
21    chmod 0666 /sys/kernel/debug/tracing/trace_clock
22    chmod 0222 /sys/kernel/debug/tracing/trace_marker
23    chmod 0666 /sys/kernel/debug/tracing/tracing_on
24
25    # ftrace events
26    chmod 0666 /sys/kernel/debug/tracing/events/binder/binder_lock/enable
27    chmod 0666 /sys/kernel/debug/tracing/events/binder/binder_locked/enable
28    chmod 0666 /sys/kernel/debug/tracing/events/binder/binder_unlock/enable
29    chmod 0666 /sys/kernel/debug/tracing/events/binder/binder_transaction/enable
30    chmod 0666 /sys/kernel/debug/tracing/events/binder/binder_transaction_received/enable
31    chmod 0666 /sys/kernel/debug/tracing/events/binder/binder_transaction_alloc_buf/enable
32
33    chmod 0666 /sys/kernel/debug/tracing/events/cgroup/enable
34    chmod 0666 /sys/kernel/debug/tracing/events/cpufreq_interactive/enable
35    chmod 0666 /sys/kernel/debug/tracing/events/dma_fence/enable
36    chmod 0666 /sys/kernel/debug/tracing/events/fence/enable
37
38    chmod 0666 /sys/kernel/debug/tracing/events/i2c/enable
39    chmod 0666 /sys/kernel/debug/tracing/events/i2c/i2c_read/enable
40    chmod 0666 /sys/kernel/debug/tracing/events/i2c/i2c_write/enable
41    chmod 0666 /sys/kernel/debug/tracing/events/i2c/i2c_result/enable
42    chmod 0666 /sys/kernel/debug/tracing/events/i2c/i2c_reply/enable
43    chmod 0666 /sys/kernel/debug/tracing/events/i2c/smbus_read/enable
44    chmod 0666 /sys/kernel/debug/tracing/events/i2c/smbus_write/enable
45    chmod 0666 /sys/kernel/debug/tracing/events/i2c/smbus_result/enable
46    chmod 0666 /sys/kernel/debug/tracing/events/i2c/smbus_reply/enable
47
48    chmod 0666 /sys/kernel/debug/tracing/events/kmem/rss_stat/enable
49    chmod 0666 /sys/kernel/debug/tracing/events/kmem/ion_heap_grow/enable
50    chmod 0666 /sys/kernel/debug/tracing/events/kmem/ion_heap_shrink/enable
51    chmod 0666 /sys/kernel/debug/tracing/events/lowmemorykiller/enable
52    chmod 0666 /sys/kernel/debug/tracing/events/lowmemorykiller/lowmemory_kill/enable
53    chmod 0666 /sys/kernel/debug/tracing/events/mm_event/mm_event_record/enable
54    chmod 0666 /sys/kernel/debug/tracing/events/oom/oom_score_adj_update/enable
55
56    chmod 0666 /sys/kernel/debug/tracing/events/power/cpu_frequency/enable
57    chmod 0666 /sys/kernel/debug/tracing/events/power/cpu_idle/enable
58    chmod 0666 /sys/kernel/debug/tracing/events/power/clock_set_rate/enable
59    chmod 0666 /sys/kernel/debug/tracing/events/power/cpu_frequency_limits/enable
60    chmod 0666 /sys/kernel/debug/tracing/events/power/gpu_frequency/enable
61
62    chmod 0666 /sys/kernel/debug/tracing/events/sched/sched_switch/enable
63    chmod 0666 /sys/kernel/debug/tracing/events/sched/sched_wakeup/enable
64    chmod 0666 /sys/kernel/debug/tracing/events/sched/sched_blocked_reason/enable
65    chmod 0666 /sys/kernel/debug/tracing/events/sched/sched_cpu_hotplug/enable
66    chmod 0666 /sys/kernel/debug/tracing/events/sched/sched_pi_setprio/enable
67    chmod 0666 /sys/kernel/debug/tracing/events/sched/sched_process_exit/enable
68    chmod 0666 /sys/kernel/debug/tracing/events/sched/sched_waking/enable
69
70    chmod 0666 /sys/kernel/debug/tracing/events/signal/signal_generate/enable
71    chmod 0666 /sys/kernel/debug/tracing/events/signal/signal_deliver/enable
72    chmod 0666 /sys/kernel/debug/tracing/events/sync/enable
73    chmod 0666 /sys/kernel/debug/tracing/events/task/task_rename/enable
74    chmod 0666 /sys/kernel/debug/tracing/events/task/task_newtask/enable
75
76    chmod 0666 /sys/kernel/debug/tracing/events/vmscan/mm_vmscan_direct_reclaim_begin/enable
77    chmod 0666 /sys/kernel/debug/tracing/events/vmscan/mm_vmscan_direct_reclaim_end/enable
78    chmod 0666 /sys/kernel/debug/tracing/events/vmscan/mm_vmscan_kswapd_wake/enable
79    chmod 0666 /sys/kernel/debug/tracing/events/vmscan/mm_vmscan_kswapd_sleep/enable
80
81    chmod 0666 /sys/kernel/debug/tracing/events/block/block_rq_issue/enable
82    chmod 0666 /sys/kernel/debug/tracing/events/block/block_rq_complete/enable
83    chmod 0666 /sys/kernel/debug/tracing/events/ext4/ext4_da_write_begin/enable
84    chmod 0666 /sys/kernel/debug/tracing/events/ext4/ext4_da_write_end/enable
85    chmod 0666 /sys/kernel/debug/tracing/events/ext4/ext4_es_lookup_extent_enter/enable
86    chmod 0666 /sys/kernel/debug/tracing/events/ext4/ext4_es_lookup_extent_exit/enable
87    chmod 0666 /sys/kernel/debug/tracing/events/ext4/ext4_load_inode/enable
88    chmod 0666 /sys/kernel/debug/tracing/events/ext4/ext4_sync_file_enter/enable
89    chmod 0666 /sys/kernel/debug/tracing/events/ext4/ext4_sync_file_exit/enable
90    chmod 0666 /sys/kernel/debug/tracing/events/f2fs/f2fs_get_data_block/enable
91    chmod 0666 /sys/kernel/debug/tracing/events/f2fs/f2fs_iget/enable
92    chmod 0666 /sys/kernel/debug/tracing/events/f2fs/f2fs_sync_file_enter/enable
93    chmod 0666 /sys/kernel/debug/tracing/events/f2fs/f2fs_sync_file_exit/enable
94    chmod 0666 /sys/kernel/debug/tracing/events/f2fs/f2fs_write_begin/enable
95    chmod 0666 /sys/kernel/debug/tracing/events/f2fs/f2fs_write_end/enable
96    chmod 0666 /sys/kernel/debug/tracing/events/filemap/mm_filemap_add_to_page_cache/enable
97    chmod 0666 /sys/kernel/debug/tracing/events/filemap/mm_filemap_delete_from_page_cache/enable
98
99    chmod 0666 /sys/kernel/debug/tracing/options/overwrite
100    chmod 0666 /sys/kernel/debug/tracing/options/print-tgid
101    chmod 0666 /sys/kernel/debug/tracing/options/record-tgid
102
103    # percpu
104    chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu0/trace
105    chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu1/trace
106    chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu2/trace
107    chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu3/trace
108    chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu4/trace
109    chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu5/trace
110    chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu6/trace
111    chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu7/trace
112    chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu8/trace
113    chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu9/trace
114    chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu10/trace
115    chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu11/trace
116    chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu12/trace
117    chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu13/trace
118    chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu14/trace
119    chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu15/trace
120
121
122    write /sys/kernel/tracing/tracing_on 0
123    chmod 0666 /sys/kernel/tracing/buffer_size_kb
124    chmod 0666 /sys/kernel/tracing/saved_cmdlines_size
125    chmod 0666 /sys/kernel/tracing/trace
126    chmod 0666 /sys/kernel/tracing/trace_clock
127    chmod 0222 /sys/kernel/tracing/trace_marker
128    chmod 0666 /sys/kernel/tracing/tracing_on
129
130    # ftrace events
131    chmod 0666 /sys/kernel/tracing/events/binder/binder_lock/enable
132    chmod 0666 /sys/kernel/tracing/events/binder/binder_locked/enable
133    chmod 0666 /sys/kernel/tracing/events/binder/binder_unlock/enable
134    chmod 0666 /sys/kernel/tracing/events/binder/binder_transaction/enable
135    chmod 0666 /sys/kernel/tracing/events/binder/binder_transaction_received/enable
136    chmod 0666 /sys/kernel/tracing/events/binder/binder_transaction_alloc_buf/enable
137
138    chmod 0666 /sys/kernel/tracing/events/cgroup/enable
139    chmod 0666 /sys/kernel/tracing/events/cpufreq_interactive/enable
140    chmod 0666 /sys/kernel/tracing/events/dma_fence/enable
141    chmod 0666 /sys/kernel/tracing/events/fence/enable
142
143    chmod 0666 /sys/kernel/tracing/events/i2c/enable
144    chmod 0666 /sys/kernel/tracing/events/i2c/i2c_read/enable
145    chmod 0666 /sys/kernel/tracing/events/i2c/i2c_write/enable
146    chmod 0666 /sys/kernel/tracing/events/i2c/i2c_result/enable
147    chmod 0666 /sys/kernel/tracing/events/i2c/i2c_reply/enable
148    chmod 0666 /sys/kernel/tracing/events/i2c/smbus_read/enable
149    chmod 0666 /sys/kernel/tracing/events/i2c/smbus_write/enable
150    chmod 0666 /sys/kernel/tracing/events/i2c/smbus_result/enable
151    chmod 0666 /sys/kernel/tracing/events/i2c/smbus_reply/enable
152
153    chmod 0666 /sys/kernel/tracing/events/kmem/rss_stat/enable
154    chmod 0666 /sys/kernel/tracing/events/kmem/ion_heap_grow/enable
155    chmod 0666 /sys/kernel/tracing/events/kmem/ion_heap_shrink/enable
156    chmod 0666 /sys/kernel/tracing/events/lowmemorykiller/enable
157    chmod 0666 /sys/kernel/tracing/events/lowmemorykiller/lowmemory_kill/enable
158    chmod 0666 /sys/kernel/tracing/events/mm_event/mm_event_record/enable
159    chmod 0666 /sys/kernel/tracing/events/oom/oom_score_adj_update/enable
160
161    chmod 0666 /sys/kernel/tracing/events/power/cpu_frequency/enable
162    chmod 0666 /sys/kernel/tracing/events/power/cpu_idle/enable
163    chmod 0666 /sys/kernel/tracing/events/power/clock_set_rate/enable
164    chmod 0666 /sys/kernel/tracing/events/power/cpu_frequency_limits/enable
165    chmod 0666 /sys/kernel/tracing/events/power/gpu_frequency/enable
166
167    chmod 0666 /sys/kernel/tracing/events/sched/sched_switch/enable
168    chmod 0666 /sys/kernel/tracing/events/sched/sched_wakeup/enable
169    chmod 0666 /sys/kernel/tracing/events/sched/sched_blocked_reason/enable
170    chmod 0666 /sys/kernel/tracing/events/sched/sched_cpu_hotplug/enable
171    chmod 0666 /sys/kernel/tracing/events/sched/sched_pi_setprio/enable
172    chmod 0666 /sys/kernel/tracing/events/sched/sched_process_exit/enable
173    chmod 0666 /sys/kernel/tracing/events/sched/sched_waking/enable
174
175    chmod 0666 /sys/kernel/tracing/events/signal/signal_generate/enable
176    chmod 0666 /sys/kernel/tracing/events/signal/signal_deliver/enable
177    chmod 0666 /sys/kernel/tracing/events/sync/enable
178    chmod 0666 /sys/kernel/tracing/events/task/task_rename/enable
179    chmod 0666 /sys/kernel/tracing/events/task/task_newtask/enable
180
181    chmod 0666 /sys/kernel/tracing/events/vmscan/mm_vmscan_direct_reclaim_begin/enable
182    chmod 0666 /sys/kernel/tracing/events/vmscan/mm_vmscan_direct_reclaim_end/enable
183    chmod 0666 /sys/kernel/tracing/events/vmscan/mm_vmscan_kswapd_wake/enable
184    chmod 0666 /sys/kernel/tracing/events/vmscan/mm_vmscan_kswapd_sleep/enable
185
186    chmod 0666 /sys/kernel/tracing/events/block/block_rq_issue/enable
187    chmod 0666 /sys/kernel/tracing/events/block/block_rq_complete/enable
188    chmod 0666 /sys/kernel/tracing/events/ext4/ext4_da_write_begin/enable
189    chmod 0666 /sys/kernel/tracing/events/ext4/ext4_da_write_end/enable
190    chmod 0666 /sys/kernel/tracing/events/ext4/ext4_es_lookup_extent_enter/enable
191    chmod 0666 /sys/kernel/tracing/events/ext4/ext4_es_lookup_extent_exit/enable
192    chmod 0666 /sys/kernel/tracing/events/ext4/ext4_load_inode/enable
193    chmod 0666 /sys/kernel/tracing/events/ext4/ext4_sync_file_enter/enable
194    chmod 0666 /sys/kernel/tracing/events/ext4/ext4_sync_file_exit/enable
195    chmod 0666 /sys/kernel/tracing/events/f2fs/f2fs_get_data_block/enable
196    chmod 0666 /sys/kernel/tracing/events/f2fs/f2fs_iget/enable
197    chmod 0666 /sys/kernel/tracing/events/f2fs/f2fs_sync_file_enter/enable
198    chmod 0666 /sys/kernel/tracing/events/f2fs/f2fs_sync_file_exit/enable
199    chmod 0666 /sys/kernel/tracing/events/f2fs/f2fs_write_begin/enable
200    chmod 0666 /sys/kernel/tracing/events/f2fs/f2fs_write_end/enable
201    chmod 0666 /sys/kernel/tracing/events/filemap/mm_filemap_add_to_page_cache/enable
202    chmod 0666 /sys/kernel/tracing/events/filemap/mm_filemap_delete_from_page_cache/enable
203
204    chmod 0666 /sys/kernel/tracing/options/overwrite
205    chmod 0666 /sys/kernel/tracing/options/print-tgid
206    chmod 0666 /sys/kernel/tracing/options/record-tgid
207
208    # percpu
209    chmod 0666 /sys/kernel/tracing/per_cpu/cpu0/trace
210    chmod 0666 /sys/kernel/tracing/per_cpu/cpu1/trace
211    chmod 0666 /sys/kernel/tracing/per_cpu/cpu2/trace
212    chmod 0666 /sys/kernel/tracing/per_cpu/cpu3/trace
213    chmod 0666 /sys/kernel/tracing/per_cpu/cpu4/trace
214    chmod 0666 /sys/kernel/tracing/per_cpu/cpu5/trace
215    chmod 0666 /sys/kernel/tracing/per_cpu/cpu6/trace
216    chmod 0666 /sys/kernel/tracing/per_cpu/cpu7/trace
217    chmod 0666 /sys/kernel/tracing/per_cpu/cpu8/trace
218    chmod 0666 /sys/kernel/tracing/per_cpu/cpu9/trace
219    chmod 0666 /sys/kernel/tracing/per_cpu/cpu10/trace
220    chmod 0666 /sys/kernel/tracing/per_cpu/cpu11/trace
221    chmod 0666 /sys/kernel/tracing/per_cpu/cpu12/trace
222    chmod 0666 /sys/kernel/tracing/per_cpu/cpu13/trace
223    chmod 0666 /sys/kernel/tracing/per_cpu/cpu14/trace
224    chmod 0666 /sys/kernel/tracing/per_cpu/cpu15/trace