From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
kernel-team@android.com, Ingo Molnar <mingo@redhat.com>,
Michael Sartain <mikesart@gmail.com>,
Joel Fernandes <joelaf@google.com>
Subject: [for-next][PATCH 2/4] tracing: Treat recording comm for idle task as a success
Date: Sun, 09 Jul 2017 07:43:59 -0400 [thread overview]
Message-ID: <20170709114418.650240461@goodmis.org> (raw)
In-Reply-To: <20170709114357.683111180@goodmis.org>
[-- Attachment #1: 0002-tracing-Treat-recording-comm-for-idle-task-as-a-succ.patch --]
[-- Type: text/plain, Size: 1085 bytes --]
From: Joel Fernandes <joelaf@google.com>
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.
Link: http://lkml.kernel.org/r/20170706230023.17942-1-joelaf@google.com
Cc: kernel-team@android.com
Cc: Ingo Molnar <mingo@redhat.com>
Reported-by: Michael Sartain <mikesart@gmail.com>
Signed-off-by: Joel Fernandes <joelaf@google.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
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 f079a8ca1117..6722d86f2af5 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.10.2
next prev parent reply other threads:[~2017-07-09 11:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-09 11:43 [for-next][PATCH 0/4] tracing: A few more changes for 4.13 Steven Rostedt
2017-07-09 11:43 ` [for-next][PATCH 1/4] tracing: Add saved_tgids file to show cached pid to tgid mappings Steven Rostedt
2017-07-09 11:43 ` Steven Rostedt [this message]
2017-07-09 11:44 ` [for-next][PATCH 3/4] tracing: Treat recording tgid for idle task as a success Steven Rostedt
2017-07-09 11:44 ` [for-next][PATCH 4/4] tracing: Attempt to record other information even if some fail Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170709114418.650240461@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=joelaf@google.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mikesart@gmail.com \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome