aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-07-13 14:40:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-07-13 14:40:11 -0400
commit35a84f34cf41915a0b2d0a3688b20761580f8ce4 (patch)
tree73ae2225bb9711977cb54fa2b89851816b4d1439
parenta0092e5ec66b122b5fd4f4997f2284fcc4cd1389 (diff)
parentf8494fa3dd10b52eab47a9666a8bc34719a129aa (diff)
Merge tag 'trace-v4.18-rc3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing fixlet from Steven Rostedt: "Joel Fernandes asked to add a feature in tracing that Android had its own patch internally for. I took it back in 4.13. Now he realizes that he had a mistake, and swapped the values from what Android had. This means that the old Android tools will break when using a new kernel that has the new feature on it. The options are: 1. To swap it back to what Android wants. 2. Add a command line option or something to do the swap 3. Just let Android carry a patch that swaps it back Since it requires setting a tracing option to enable this anyway, I doubt there are other users of this than Android. Thus, I've decided to take option 1. If someone else is actually depending on the order that is in the kernel, then we will have to revert this change and go to option 2 or 3" * tag 'trace-v4.18-rc3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Reorder display of TGID to be after PID
-rw-r--r--kernel/trace/trace.c8
-rw-r--r--kernel/trace/trace_output.c5
2 files changed, 7 insertions, 6 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index f054bd6a1c66..87cf25171fb8 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3365,8 +3365,8 @@ static void print_func_help_header(struct trace_buffer *buf, struct seq_file *m,
3365 3365
3366 print_event_info(buf, m); 3366 print_event_info(buf, m);
3367 3367
3368 seq_printf(m, "# TASK-PID CPU# %s TIMESTAMP FUNCTION\n", tgid ? "TGID " : ""); 3368 seq_printf(m, "# TASK-PID %s CPU# TIMESTAMP FUNCTION\n", tgid ? "TGID " : "");
3369 seq_printf(m, "# | | | %s | |\n", tgid ? " | " : ""); 3369 seq_printf(m, "# | | %s | | |\n", tgid ? " | " : "");
3370} 3370}
3371 3371
3372static void print_func_help_header_irq(struct trace_buffer *buf, struct seq_file *m, 3372static void print_func_help_header_irq(struct trace_buffer *buf, struct seq_file *m,
@@ -3386,9 +3386,9 @@ static void print_func_help_header_irq(struct trace_buffer *buf, struct seq_file
3386 tgid ? tgid_space : space); 3386 tgid ? tgid_space : space);
3387 seq_printf(m, "# %s||| / delay\n", 3387 seq_printf(m, "# %s||| / delay\n",
3388 tgid ? tgid_space : space); 3388 tgid ? tgid_space : space);
3389 seq_printf(m, "# TASK-PID CPU#%s|||| TIMESTAMP FUNCTION\n", 3389 seq_printf(m, "# TASK-PID %sCPU# |||| TIMESTAMP FUNCTION\n",
3390 tgid ? " TGID " : space); 3390 tgid ? " TGID " : space);
3391 seq_printf(m, "# | | | %s|||| | |\n", 3391 seq_printf(m, "# | | %s | |||| | |\n",
3392 tgid ? " | " : space); 3392 tgid ? " | " : space);
3393} 3393}
3394 3394
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index 90db994ac900..1c8e30fda46a 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -594,8 +594,7 @@ int trace_print_context(struct trace_iterator *iter)
594 594
595 trace_find_cmdline(entry->pid, comm); 595 trace_find_cmdline(entry->pid, comm);
596 596
597 trace_seq_printf(s, "%16s-%-5d [%03d] ", 597 trace_seq_printf(s, "%16s-%-5d ", comm, entry->pid);
598 comm, entry->pid, iter->cpu);
599 598
600 if (tr->trace_flags & TRACE_ITER_RECORD_TGID) { 599 if (tr->trace_flags & TRACE_ITER_RECORD_TGID) {
601 unsigned int tgid = trace_find_tgid(entry->pid); 600 unsigned int tgid = trace_find_tgid(entry->pid);
@@ -606,6 +605,8 @@ int trace_print_context(struct trace_iterator *iter)
606 trace_seq_printf(s, "(%5d) ", tgid); 605 trace_seq_printf(s, "(%5d) ", tgid);
607 } 606 }
608 607
608 trace_seq_printf(s, "[%03d] ", iter->cpu);
609
609 if (tr->trace_flags & TRACE_ITER_IRQ_INFO) 610 if (tr->trace_flags & TRACE_ITER_IRQ_INFO)
610 trace_print_lat_fmt(s, entry); 611 trace_print_lat_fmt(s, entry);
611 612