Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1682800
| From | Joel Fernandes <joelaf@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/3] tracing: Treat recording comm for idle task as a success |
| Date | 2017-07-07 01:10 +0200 |
| Message-ID | <u0o4j-3Nh-43@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Currently we stop recording comm for non-idle tasks when switching from/to idle
task since we treat that as a record failure. Fix that by treat recording of
comm for idle task as a success.
Cc: kernel-team@android.com
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>
Reported-by: Michael Sartain <mikesart@gmail.com>
Signed-off-by: Joel Fernandes <joelaf@google.com>
---
kernel/trace/trace.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index c579dea4a0eb..7a0c493723a9 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1916,7 +1916,11 @@ static int trace_save_cmdline(struct task_struct *tsk)
{
unsigned pid, idx;
- if (!tsk->pid || unlikely(tsk->pid > PID_MAX_DEFAULT))
+ /* treat recording of idle task as a success */
+ if (!tsk->pid)
+ return 1;
+
+ if (unlikely(tsk->pid > PID_MAX_DEFAULT))
return 0;
/*
--
2.13.2.725.g09c95d1e9-goog
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 1/3] tracing: Treat recording comm for idle task as a success Joel Fernandes <joelaf@google.com> - 2017-07-07 01:10 +0200 [PATCH 3/3] tracing: Attempt to record other information even if some fail Joel Fernandes <joelaf@google.com> - 2017-07-07 01:10 +0200
csiph-web