Martin Liu | 9c2ecc3 | 2020-04-17 18:47:57 +0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2020 The Android Open-Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | on property:sys.boot_completed=1 |
| 17 | # Create mm_event trace point. |
| 18 | # Currently, only mm_event is using this trace instance. |
| 19 | # If others want to put more,it should get hard review from pixel-perf-team. |
| 20 | mkdir /sys/kernel/tracing/instances/pixel-trace 0755 system system |
| 21 | chown system system /sys/kernel/tracing/instances/pixel-trace/trace |
| 22 | chmod 0660 /sys/kernel/tracing/instances/pixel-trace/trace |
| 23 | chown system system /sys/kernel/tracing/instances/pixel-trace/tracing_on |
| 24 | chmod 0660 /sys/kernel/tracing/instances/pixel-trace/tracing_on |
| 25 | write /sys/kernel/tracing/instances/pixel-trace/buffer_size_kb 64 |
| 26 | write /sys/kernel/tracing/instances/pixel-trace/events/mm_event/enable 1 |
| 27 | write /sys/kernel/tracing/instances/pixel-trace/events/f2fs/f2fs_iostat/enable 1 |
| 28 | write /sys/kernel/tracing/instances/pixel-trace/events/ufs/ufs_stats/enable 1 |
Leo Liou | feb93f8 | 2020-10-21 08:21:51 +0800 | [diff] [blame] | 29 | write /sys/kernel/tracing/instances/pixel-trace/events/ufs_pixel/ufs_stats/enable 1 |
Minchan Kim | 4b5784e | 2020-09-14 09:59:51 -0700 | [diff] [blame] | 30 | chmod 444 /sys/kernel/debug/page_owner |
Martin Liu | 9c2ecc3 | 2020-04-17 18:47:57 +0800 | [diff] [blame] | 31 | |
| 32 | # turns off tracing right before bugreporting to keep more traces |
| 33 | on property:init.svc.dumpstatez=running |
| 34 | write /sys/kernel/tracing/instances/pixel-trace/tracing_on 0 |
| 35 | |
| 36 | on property:init.svc.dumpstatez=stopped |
| 37 | write /sys/kernel/tracing/instances/pixel-trace/tracing_on 1 |
| 38 | |
| 39 | on property:init.svc.bugreport=running |
| 40 | write /sys/kernel/tracing/instances/pixel-trace/tracing_on 0 |
| 41 | |
| 42 | on property:init.svc.bugreport=stopped |
| 43 | write /sys/kernel/tracing/instances/pixel-trace/tracing_on 1 |
Martin Liu | 5352dbf | 2020-07-24 11:17:13 +0800 | [diff] [blame] | 44 | |
| 45 | on property:init.svc.bugreportd=running |
| 46 | write /sys/kernel/tracing/instances/pixel-trace/tracing_on 0 |
| 47 | |
| 48 | on property:init.svc.bugreportd=stopped |
| 49 | write /sys/kernel/tracing/instances/pixel-trace/tracing_on 1 |