atrace: make fs-specific sysfs entries optional
The availability of these sysfs entries will vary based on the kernel's
supported filesystems, so don't block the disk category if some of them
are missing.
Bug: 18467498
Change-Id: I96200f1b5cf3f1a8fa8186602552adc96ddffc04
Signed-off-by: Greg Hackmann <ghackmann@google.com>
diff --git a/cmds/atrace/atrace.cpp b/cmds/atrace/atrace.cpp
index f0a52d8..a3d210a 100644
--- a/cmds/atrace/atrace.cpp
+++ b/cmds/atrace/atrace.cpp
@@ -106,14 +106,14 @@
{ REQ, "/sys/kernel/debug/tracing/events/power/cpu_idle/enable" },
} },
{ "disk", "Disk I/O", 0, {
- { REQ, "/sys/kernel/debug/tracing/events/f2fs/f2fs_sync_file_enter/enable" },
- { REQ, "/sys/kernel/debug/tracing/events/f2fs/f2fs_sync_file_exit/enable" },
- { REQ, "/sys/kernel/debug/tracing/events/f2fs/f2fs_write_begin/enable" },
- { REQ, "/sys/kernel/debug/tracing/events/f2fs/f2fs_write_end/enable" },
- { REQ, "/sys/kernel/debug/tracing/events/ext4/ext4_da_write_begin/enable" },
- { REQ, "/sys/kernel/debug/tracing/events/ext4/ext4_da_write_end/enable" },
- { REQ, "/sys/kernel/debug/tracing/events/ext4/ext4_sync_file_enter/enable" },
- { REQ, "/sys/kernel/debug/tracing/events/ext4/ext4_sync_file_exit/enable" },
+ { OPT, "/sys/kernel/debug/tracing/events/f2fs/f2fs_sync_file_enter/enable" },
+ { OPT, "/sys/kernel/debug/tracing/events/f2fs/f2fs_sync_file_exit/enable" },
+ { OPT, "/sys/kernel/debug/tracing/events/f2fs/f2fs_write_begin/enable" },
+ { OPT, "/sys/kernel/debug/tracing/events/f2fs/f2fs_write_end/enable" },
+ { OPT, "/sys/kernel/debug/tracing/events/ext4/ext4_da_write_begin/enable" },
+ { OPT, "/sys/kernel/debug/tracing/events/ext4/ext4_da_write_end/enable" },
+ { OPT, "/sys/kernel/debug/tracing/events/ext4/ext4_sync_file_enter/enable" },
+ { OPT, "/sys/kernel/debug/tracing/events/ext4/ext4_sync_file_exit/enable" },
{ REQ, "/sys/kernel/debug/tracing/events/block/block_rq_issue/enable" },
{ REQ, "/sys/kernel/debug/tracing/events/block/block_rq_complete/enable" },
} },