Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'trace-fixes-v3.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing fix from Steven Rostedt:
"Yoshihiro Yunomae fixed a regression in the output format when using
one of the counter clocks.

The new multibuffer code changed the trace_clock file to update the
trace instances tr->clock_id but the actual traces still used the
value from the obsolete global variable trace_clock_id"

* tag 'trace-fixes-v3.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
tracing: Fix outputting formats of x86-tsc and counter when use trace_clock

+3 -7
+3 -5
kernel/trace/trace.c
··· 652 652 ARCH_TRACE_CLOCKS 653 653 }; 654 654 655 - int trace_clock_id; 656 - 657 655 /* 658 656 * trace_parser_get_init - gets the buffer for trace parser 659 657 */ ··· 2824 2826 iter->iter_flags |= TRACE_FILE_ANNOTATE; 2825 2827 2826 2828 /* Output in nanoseconds only if we are using a clock in nanoseconds. */ 2827 - if (trace_clocks[trace_clock_id].in_ns) 2829 + if (trace_clocks[tr->clock_id].in_ns) 2828 2830 iter->iter_flags |= TRACE_FILE_TIME_IN_NS; 2829 2831 2830 2832 /* stop the trace while dumping if we are not opening "snapshot" */ ··· 3823 3825 iter->iter_flags |= TRACE_FILE_LAT_FMT; 3824 3826 3825 3827 /* Output in nanoseconds only if we are using a clock in nanoseconds. */ 3826 - if (trace_clocks[trace_clock_id].in_ns) 3828 + if (trace_clocks[tr->clock_id].in_ns) 3827 3829 iter->iter_flags |= TRACE_FILE_TIME_IN_NS; 3828 3830 3829 3831 iter->cpu_file = tc->cpu; ··· 5093 5095 cnt = ring_buffer_bytes_cpu(trace_buf->buffer, cpu); 5094 5096 trace_seq_printf(s, "bytes: %ld\n", cnt); 5095 5097 5096 - if (trace_clocks[trace_clock_id].in_ns) { 5098 + if (trace_clocks[tr->clock_id].in_ns) { 5097 5099 /* local or global for trace_clock */ 5098 5100 t = ns2usecs(ring_buffer_oldest_event_ts(trace_buf->buffer, cpu)); 5099 5101 usec_rem = do_div(t, USEC_PER_SEC);
-2
kernel/trace/trace.h
··· 700 700 701 701 extern unsigned long trace_flags; 702 702 703 - extern int trace_clock_id; 704 - 705 703 /* Standard output formatting function used for function return traces */ 706 704 #ifdef CONFIG_FUNCTION_GRAPH_TRACER 707 705