lkml.org 
[lkml]   [2017]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] trace: Make trace_hwlat timestamp y2038 safe
Hi Deepa,

[auto build test WARNING on tip/perf/core]
[also build test WARNING on v4.11-rc4 next-20170327]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Deepa-Dinamani/trace-Make-trace_hwlat-timestamp-y2038-safe/20170327-150010
config: x86_64-randconfig-n0-03271517 (attached as .config)
compiler: gcc-4.8 (Debian 4.8.4-1) 4.8.4
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All warnings (new ones prefixed by >>):

kernel/trace/trace_output.c: In function 'trace_hwlat_print':
>> kernel/trace/trace_output.c:1168:5: warning: format '%lld' expects argument of type 'long long int', but argument 6 has type '__kernel_time_t' [-Wformat=]
field->timestamp.tv_nsec);
^
kernel/trace/trace_output.c: In function 'trace_hwlat_raw':
kernel/trace/trace_output.c:1202:5: warning: format '%lld' expects argument of type 'long long int', but argument 5 has type '__kernel_time_t' [-Wformat=]
field->seqnum);
^
Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:__ffs
Cyclomatic Complexity 1 include/linux/list.h:INIT_LIST_HEAD
Cyclomatic Complexity 2 include/linux/list.h:__list_add
Cyclomatic Complexity 1 include/linux/list.h:list_add_tail
Cyclomatic Complexity 1 include/linux/list.h:__list_del
Cyclomatic Complexity 2 include/linux/list.h:__list_del_entry
Cyclomatic Complexity 1 include/linux/list.h:list_del
Cyclomatic Complexity 1 include/linux/list.h:list_empty
Cyclomatic Complexity 2 include/linux/list.h:__hlist_del
Cyclomatic Complexity 1 include/linux/list.h:hlist_del
Cyclomatic Complexity 2 include/linux/list.h:hlist_add_head
Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_lock_acquire
Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_lock_release
Cyclomatic Complexity 4 include/linux/rcupdate.h:rcu_read_lock
Cyclomatic Complexity 4 include/linux/rcupdate.h:rcu_read_unlock
Cyclomatic Complexity 1 include/linux/seq_buf.h:seq_buf_clear
Cyclomatic Complexity 1 include/linux/seq_buf.h:seq_buf_init
Cyclomatic Complexity 1 include/linux/seq_buf.h:seq_buf_has_overflowed
Cyclomatic Complexity 1 include/linux/seq_buf.h:seq_buf_used
Cyclomatic Complexity 1 include/linux/trace_seq.h:trace_seq_init
Cyclomatic Complexity 1 include/linux/trace_seq.h:trace_seq_buffer_ptr
Cyclomatic Complexity 3 include/linux/trace_seq.h:trace_seq_has_overflowed
Cyclomatic Complexity 2 include/linux/trace_events.h:trace_handle_return
Cyclomatic Complexity 3 include/linux/trace_events.h:trace_event_name
Cyclomatic Complexity 1 kernel/trace/trace_output.c:kretprobed
Cyclomatic Complexity 3 kernel/trace/trace_output.c:task_state_char
Cyclomatic Complexity 5 kernel/trace/trace_output.c:trace_search_list
Cyclomatic Complexity 1 kernel/trace/trace_output.c:trace_nop_print
Cyclomatic Complexity 2 kernel/trace/trace_output.c:trace_hwlat_raw
Cyclomatic Complexity 2 kernel/trace/trace_output.c:trace_print_raw
Cyclomatic Complexity 2 kernel/trace/trace_output.c:trace_bprint_raw
Cyclomatic Complexity 2 kernel/trace/trace_output.c:trace_bputs_raw
Cyclomatic Complexity 3 kernel/trace/trace_output.c:trace_ctxwake_raw
Cyclomatic Complexity 1 kernel/trace/trace_output.c:trace_wake_raw
Cyclomatic Complexity 1 kernel/trace/trace_output.c:trace_ctx_raw
Cyclomatic Complexity 2 kernel/trace/trace_output.c:trace_fn_raw
Cyclomatic Complexity 3 kernel/trace/trace_output.c:trace_raw_data
Cyclomatic Complexity 3 kernel/trace/trace_output.c:trace_hwlat_print
Cyclomatic Complexity 1 kernel/trace/trace_output.c:trace_output_raw
Cyclomatic Complexity 1 kernel/trace/trace_output.c:seq_print_sym_offset
Cyclomatic Complexity 1 kernel/trace/trace_output.c:seq_print_sym_short
Cyclomatic Complexity 2 kernel/trace/trace_output.c:trace_ctxwake_print
Cyclomatic Complexity 1 kernel/trace/trace_output.c:trace_wake_print
Cyclomatic Complexity 1 kernel/trace/trace_output.c:trace_ctx_print
Cyclomatic Complexity 9 kernel/trace/trace_output.c:seq_print_user_ip
Cyclomatic Complexity 9 kernel/trace/trace_output.c:trace_user_stack_print
Cyclomatic Complexity 2 kernel/trace/trace_output.c:trace_ctxwake_bin
Cyclomatic Complexity 2 kernel/trace/trace_output.c:trace_fn_bin
Cyclomatic Complexity 3 kernel/trace/trace_output.c:trace_ctxwake_hex
Cyclomatic Complexity 1 kernel/trace/trace_output.c:trace_wake_hex
Cyclomatic Complexity 1 kernel/trace/trace_output.c:trace_ctx_hex
Cyclomatic Complexity 2 kernel/trace/trace_output.c:trace_fn_hex
Cyclomatic Complexity 2 kernel/trace/trace_output.c:trace_print_bputs_msg_only
Cyclomatic Complexity 2 kernel/trace/trace_output.c:trace_print_bprintk_msg_only
Cyclomatic Complexity 2 kernel/trace/trace_output.c:trace_print_printk_msg_only
Cyclomatic Complexity 7 kernel/trace/trace_output.c:trace_print_flags_seq
Cyclomatic Complexity 4 kernel/trace/trace_output.c:trace_print_symbols_seq
Cyclomatic Complexity 1 kernel/trace/trace_output.c:trace_print_bitmask_seq
Cyclomatic Complexity 3 kernel/trace/trace_output.c:trace_print_hex_seq
Cyclomatic Complexity 6 kernel/trace/trace_output.c:trace_print_array_seq
Cyclomatic Complexity 5 kernel/trace/trace_output.c:trace_raw_output_prep
Cyclomatic Complexity 1 kernel/trace/trace_output.c:trace_output_call
Cyclomatic Complexity 4 kernel/trace/trace_output.c:seq_print_ip_sym
Cyclomatic Complexity 2 kernel/trace/trace_output.c:trace_print_print
Cyclomatic Complexity 2 kernel/trace/trace_output.c:trace_bprint_print
Cyclomatic Complexity 2 kernel/trace/trace_output.c:trace_bputs_print
Cyclomatic Complexity 6 kernel/trace/trace_output.c:trace_stack_print
Cyclomatic Complexity 4 kernel/trace/trace_output.c:trace_fn_trace
Cyclomatic Complexity 12 kernel/trace/trace_output.c:trace_print_lat_fmt
Cyclomatic Complexity 1 kernel/trace/trace_output.c:lat_print_generic
Cyclomatic Complexity 4 kernel/trace/trace_output.c:trace_find_mark
Cyclomatic Complexity 5 kernel/trace/trace_output.c:lat_print_timestamp
Cyclomatic Complexity 3 kernel/trace/trace_output.c:trace_print_context
Cyclomatic Complexity 3 kernel/trace/trace_output.c:trace_print_lat_context
Cyclomatic Complexity 5 kernel/trace/trace_output.c:ftrace_find_event
Cyclomatic Complexity 1 kernel/trace/trace_output.c:trace_event_read_lock
Cyclomatic Complexity 1 kernel/trace/trace_output.c:trace_event_read_unlock
Cyclomatic Complexity 17 kernel/trace/trace_output.c:register_trace_event
Cyclomatic Complexity 6 kernel/trace/trace_output.c:init_events
Cyclomatic Complexity 1 kernel/trace/trace_output.c:__unregister_trace_event
Cyclomatic Complexity 1 kernel/trace/trace_output.c:unregister_trace_event

vim +1168 kernel/trace/trace_output.c

e7c15cd8 Steven Rostedt (Red Hat 2016-06-23 1152) /* TRACE_HWLAT */
e7c15cd8 Steven Rostedt (Red Hat 2016-06-23 1153) static enum print_line_t
e7c15cd8 Steven Rostedt (Red Hat 2016-06-23 1154) trace_hwlat_print(struct trace_iterator *iter, int flags,
e7c15cd8 Steven Rostedt (Red Hat 2016-06-23 1155) struct trace_event *event)
e7c15cd8 Steven Rostedt (Red Hat 2016-06-23 1156) {
e7c15cd8 Steven Rostedt (Red Hat 2016-06-23 1157) struct trace_entry *entry = iter->ent;
e7c15cd8 Steven Rostedt (Red Hat 2016-06-23 1158) struct trace_seq *s = &iter->seq;
e7c15cd8 Steven Rostedt (Red Hat 2016-06-23 1159) struct hwlat_entry *field;
e7c15cd8 Steven Rostedt (Red Hat 2016-06-23 1160)
e7c15cd8 Steven Rostedt (Red Hat 2016-06-23 1161) trace_assign_type(field, entry);
e7c15cd8 Steven Rostedt (Red Hat 2016-06-23 1162)
df001907 Deepa Dinamani 2017-03-26 1163 trace_seq_printf(s, "#%-5u inner/outer(us): %4llu/%-5llu ts:%lld.%09ld",
e7c15cd8 Steven Rostedt (Red Hat 2016-06-23 1164) field->seqnum,
e7c15cd8 Steven Rostedt (Red Hat 2016-06-23 1165) field->duration,
e7c15cd8 Steven Rostedt (Red Hat 2016-06-23 1166) field->outer_duration,
e7c15cd8 Steven Rostedt (Red Hat 2016-06-23 1167) field->timestamp.tv_sec,
e7c15cd8 Steven Rostedt (Red Hat 2016-06-23 @1168) field->timestamp.tv_nsec);
e7c15cd8 Steven Rostedt (Red Hat 2016-06-23 1169)
7b2c8625 Steven Rostedt (Red Hat 2016-08-04 1170) if (field->nmi_count) {
7b2c8625 Steven Rostedt (Red Hat 2016-08-04 1171) /*
7b2c8625 Steven Rostedt (Red Hat 2016-08-04 1172) * The generic sched_clock() is not NMI safe, thus
7b2c8625 Steven Rostedt (Red Hat 2016-08-04 1173) * we only record the count and not the time.
7b2c8625 Steven Rostedt (Red Hat 2016-08-04 1174) */
7b2c8625 Steven Rostedt (Red Hat 2016-08-04 1175) if (!IS_ENABLED(CONFIG_GENERIC_SCHED_CLOCK))
7b2c8625 Steven Rostedt (Red Hat 2016-08-04 1176) trace_seq_printf(s, " nmi-total:%llu",

:::::: The code at line 1168 was first introduced by commit
:::::: e7c15cd8a113335cf7154f027c9c8da1a92238ee tracing: Added hardware latency tracer

:::::: TO: Steven Rostedt (Red Hat) <rostedt@goodmis.org>
:::::: CC: Steven Rostedt <rostedt@goodmis.org>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2017-03-27 11:29    [W:0.211 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site