aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorSergey Senozhatsky <[email protected]>2018-10-02 11:38:35 +0900
committerPetr Mladek <[email protected]>2018-10-12 10:03:39 +0200
commit3ac37a93fa9217e576bebfd4ba3e80edaaeb2289 (patch)
tree5ac022d5c88ad6842a498ed57d9de4cacd01a01b /tools/perf/util/trace-event-scripting.c
parent9627808d2d409279cea3fb334212d04a83ff6371 (diff)
printk: lock/unlock console only for new logbuf entries
Prior to commit 5c2992ee7fd8a29 ("printk: remove console flushing special cases for partial buffered lines") we would do console_cont_flush() for each pr_cont() to print cont fragments, so console_unlock() would actually print data: pr_cont(); console_lock(); console_unlock() console_cont_flush(); // print cont fragment ... pr_cont(); console_lock(); console_unlock() console_cont_flush(); // print cont fragment We don't do console_cont_flush() anymore, so when we do pr_cont() console_unlock() does nothing (unless we flushed the cont buffer): pr_cont(); console_lock(); console_unlock(); // noop ... pr_cont(); console_lock(); console_unlock(); // noop ... pr_cont(); cont_flush(); console_lock(); console_unlock(); // print data We also wakeup klogd purposelessly for pr_cont() output - un-flushed cont buffer is not stored in log_buf; there is nothing to pull. Thus we can console_lock()/console_unlock()/wake_up_klogd() only when we know that we log_store()-ed a message and there is something to print to the consoles/syslog. Link: http://lkml.kernel.org/r/[email protected] To: Steven Rostedt <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Dmitriy Vyukov <[email protected]> Cc: Tetsuo Handa <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: LKML <[email protected]> Cc: Sergey Senozhatsky <[email protected]> Signed-off-by: Sergey Senozhatsky <[email protected]> Signed-off-by: Petr Mladek <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions