Chintan Pandya
c5c4f1ef81
Disable redundant trace event for performance reasons
...
It's been found that every GIA trace events takes about
0.7 us. GIA driver throws 5 trace events for every IRQ
via GIA. Reducing some events would make IRQ handler
flow a but more optimized.
Bug: 380463996
Test: observed the trace and the disabled trace entries
are not longer present, reducing pressure on runtime
performance as well as memory pressure on trace buffer.
Flag: EXEMPT, optimize interrupt tracing.
Change-Id: I233d82da7a6eb75344afe3798c9f850a74e5e16b
Signed-off-by: Chintan Pandya <chintanpandya@google.com>
2024-12-19 22:59:37 +00:00
Chintan Pandya
60a9a7b17b
Optimize interrupts trace buffer size
...
Reduce the trace buffer size further
Bug: 383121598
Test: Manually observed the optimized trace settings
Flag: EXEMPT, optimize interrupt tracing.
Change-Id: Id6e02df4d73a97b99a019b210dbd508b115462fc
Signed-off-by: Chintan Pandya <chintanpandya@google.com>
2024-12-19 22:59:37 +00:00
Chintan Pandya
a67610e46e
Update irq_gia_google permission
...
Current permission 666 blocks bugreport use-case be able to
copy interrupt traces into bugreport. Provide required
permissions.
Bug: 376124648
Test: Captured bugreport and traces are visible in that.
Flag: EXEMPT, init rc change to modify permission
Change-Id: Ib03ab97fcd65d18e2420421f8fc997eefd55570f
Signed-off-by: Chintan Pandya <chintanpandya@google.com>
2024-12-19 22:59:25 +00:00
Chintan Pandya
f94206fea7
Reduce the trace instance irq_gia_google's buffer size
...
Bug: 382283364
Test: Verified that trace buffer size reduced.
Flag: EXEMPT, init rc change to reduce trace buffer size
Change-Id: I8bf50ac8fa3cff263592b3eca1a6b72a20b2b129
Signed-off-by: Chintan Pandya <chintanpandya@google.com>
2024-12-06 23:10:45 +00:00
Chintan Pandya
2d6b42c487
Remove code that just re-enables IRQ and GIA events
...
These events are already enabled from kernel.
Bug: 378928822
Test: Verified that trace functionality works as expected.
Flag: EXEMPT, just a clean up in init rc
Change-Id: I9e50e3d86e914b0db8633a1ae7287875b4df9838
Signed-off-by: Chintan Pandya <chintanpandya@google.com>
2024-12-06 23:08:30 +00:00
Chintan Pandya
d6b9cc46bf
Introduce interrupts module for debug and trace
...
Interrupts module has following functions to perform:
1. Apply boot time configuration
- Create a new trace instance
- Enable required irq and irq_gia events in the
instance
- Apply required filters on the high frequency
events
- Set instance's trace buffer size
- Enable tracing
2. Sepolicy for every required access
3. Copy interrupts trace buffer to dumpsys whenever triggered
AVC denials:
avc: denied { search } for comm="dump_interrupts" name="radio" dev="dm-53" ino=373 scontext=u:r:dump_interrupts_traces:s0 tcontext=u:object_r:radio_vendor_data_file:s0 tclass=dir permissive=1
avc: denied { write } for comm="dump_interrupts" name="all_logs" dev="dm-53" ino=7808 scontext=u:r:dump_interrupts_traces:s0 tcontext=u:object_r:radio_vendor_data_file:s0 tclass=dir permissive=1
avc: denied { add_name } for comm="dump_interrupts" name="interrupts" scontext=u:r:dump_interrupts_traces:s0 tcontext=u:object_r:radio_vendor_data_file:s0 tclass=dir permissive=1
avc: denied { create } for comm="dump_interrupts" name="interrupts" scontext=u:r:dump_interrupts_traces:s0 tcontext=u:object_r:radio_vendor_data_file:s0 tclass=dir permissive=1
avc: denied { search } for comm="dump_interrupts" name="instances" dev="tracefs" ino=2151 scontext=u:r:dump_interrupts_traces:s0 tcontext=u:object_r:debugfs_tracing_instances:s0 tclass=dir permissive=1
avc: denied { search } for comm="dump_interrupts" name="radio" dev="dm-53" ino=373 scontext=u:r:dump_interrupts_traces:s0 tcontext=u:object_r:radio_vendor_data_file:s0 tclass=dir permissive=1
avc: denied { read } for comm="dump_interrupts" name="trace" dev="tracefs" ino=143409 scontext=u:r:dump_interrupts_traces:s0 tcontext=u:object_r:tracefs_instances_interrupts:s0 tclass=file permissive=1
avc: denied { open } for comm="dump_interrupts" path="/sys/kernel/tracing/instances/irq_gia_google/trace" dev="tracefs" ino=143409 scontext=u:r:dump_interrupts_traces:s0 tcontext=u:object_r:tracefs_instances_interrupts:s0 tclass=file permissive=1
avc: denied { create } for comm="dump_interrupts" name="interrupts_trace" scontext=u:r:dump_interrupts_traces:s0 tcontext=u:object_r:radio_vendor_data_file:s0 tclass=file permissive=1
avc: denied { write open } for comm="dump_interrupts" path="/data/vendor/radio/logs/always-on/all_logs/interrupts/interrupts_trace" dev="dm-53" ino=8102 scontext=u:r:dump_interrupts_traces:s0 tcontext=u:object_r:radio_vendor_data_file:s0 tclass=file permissive=1
avc: denied { getattr } for comm="dump_interrupts" path="/sys/kernel/tracing/instances/irq_gia_google/trace" dev="tracefs" ino=141578 scontext=u:r:dump_interrupts_traces:s0 tcontext=u:object_r:tracefs_instances_interrupts:s0 tclass=file permissive=1
avc: denied { getattr } for comm="dump_interrupts" path="/data/vendor/radio/logs/always-on/all_logs/interrupts/interrupts_trace" dev="dm-53" ino=7965 scontext=u:r:dump_interrupts_traces:s0 tcontext=u:object_r:radio_vendor_data_file:s0 tclass=file permissive=1
Flag: EXEMPT, add interrupts traces dump program to bugreport
Bug: 376124648
Test: Manually checked boot time trace configuration. Collected
`adb bugreport`. And checked interrupt traces are dumped
into and extracted out from the bugreport. More details
in the bug.
Change-Id: I08872a321fa9726b50a54aeb0a91ed63c0652a3a
2024-11-22 21:38:57 +00:00