OSDN Git Service

Support halt the trace when schd-dbg hit deadline
authorHoward Chen <howardsoc@google.com>
Tue, 28 Mar 2017 09:05:11 +0000 (17:05 +0800)
committerHoward Chen <howardsoc@google.com>
Thu, 6 Apr 2017 02:23:55 +0000 (10:23 +0800)
commit4c51b7ebb0110872973e6167bac1a1e8d300df4b
tree64dcc66dc87a5b30812c0d37f6be5e48558ddb90
parent8039adad34b696971ac4c3b3287fb14d8c76985d
Support halt the trace when schd-dbg hit deadline

Usage:

start atrace as usual:
>atrace --async_start sched freq ...

then use schd-dbg with -trace arguments
./schd-dbg -trace -deadline_us 2500

This makes schd-dbg to stop trace once it detects a transaction
duration over the deadline. By writing '0' to
/sys/kernel/debug/tracing and halt the process. The tracelog is
then available on /sys/kernel/debug/trace

Bug: b/36669012
Test: sailfish with prebuilt kernel
Change-Id: I9f81109cd22705f070f3f78ddf3539b8fa1f9973
libs/binder/tests/schd-dbg.cpp