From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-rt-devel:linux-5.10.y-rt 250/279] kernel/trace/trace_branch.c:62:2: error: 'trace_ctx' undeclared; did you mean
Date: Wed, 17 Feb 2021 12:16:19 +0800 [thread overview]
Message-ID: <202102171214.NADMwp5e-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4388 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.10.y-rt
head: 822f2ce254f44f8e65ccb2cdbd7cf4cf2208a3ff
commit: e7dc055a10416e0c6eabd518d6ed89da38eca0f1 [250/279] tracing: Merge irqflags + preemt counter, add RT bits (update)
config: i386-randconfig-a005-20210216 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?id=e7dc055a10416e0c6eabd518d6ed89da38eca0f1
git remote add linux-rt-devel https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
git fetch --no-tags linux-rt-devel linux-5.10.y-rt
git checkout e7dc055a10416e0c6eabd518d6ed89da38eca0f1
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Note: the linux-rt-devel/linux-5.10.y-rt HEAD 822f2ce254f44f8e65ccb2cdbd7cf4cf2208a3ff builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
kernel/trace/trace_branch.c: In function 'probe_likely_condition':
>> kernel/trace/trace_branch.c:62:2: error: 'trace_ctx' undeclared (first use in this function); did you mean 'trace_reg'?
62 | trace_ctx = _tracing_gen_ctx_flags(flags);
| ^~~~~~~~~
| trace_reg
kernel/trace/trace_branch.c:62:2: note: each undeclared identifier is reported only once for each function it appears in
kernel/trace/trace_branch.c:40:15: warning: unused variable 'pc' [-Wunused-variable]
40 | unsigned int pc;
| ^~
kernel/trace/trace_branch.c: At top level:
kernel/trace/trace_branch.c:205:6: warning: no previous prototype for 'ftrace_likely_update' [-Wmissing-prototypes]
205 | void ftrace_likely_update(struct ftrace_likely_data *f, int val,
| ^~~~~~~~~~~~~~~~~~~~
vim +62 kernel/trace/trace_branch.c
29
30 static void
31 probe_likely_condition(struct ftrace_likely_data *f, int val, int expect)
32 {
33 struct trace_event_call *call = &event_branch;
34 struct trace_array *tr = branch_tracer;
35 struct trace_buffer *buffer;
36 struct trace_array_cpu *data;
37 struct ring_buffer_event *event;
38 struct trace_branch *entry;
39 unsigned long flags;
40 unsigned int pc;
41 const char *p;
42
43 if (current->trace_recursion & TRACE_BRANCH_BIT)
44 return;
45
46 /*
47 * I would love to save just the ftrace_likely_data pointer, but
48 * this code can also be used by modules. Ugly things can happen
49 * if the module is unloaded, and then we go and read the
50 * pointer. This is slower, but much safer.
51 */
52
53 if (unlikely(!tr))
54 return;
55
56 raw_local_irq_save(flags);
57 current->trace_recursion |= TRACE_BRANCH_BIT;
58 data = this_cpu_ptr(tr->array_buffer.data);
59 if (atomic_read(&data->disabled))
60 goto out;
61
> 62 trace_ctx = _tracing_gen_ctx_flags(flags);
63 buffer = tr->array_buffer.buffer;
64 event = trace_buffer_lock_reserve(buffer, TRACE_BRANCH,
65 sizeof(*entry), trace_ctx);
66 if (!event)
67 goto out;
68
69 entry = ring_buffer_event_data(event);
70
71 /* Strip off the path, only save the file */
72 p = f->data.file + strlen(f->data.file);
73 while (p >= f->data.file && *p != '/')
74 p--;
75 p++;
76
77 strncpy(entry->func, f->data.func, TRACE_FUNC_SIZE);
78 strncpy(entry->file, p, TRACE_FILE_SIZE);
79 entry->func[TRACE_FUNC_SIZE] = 0;
80 entry->file[TRACE_FILE_SIZE] = 0;
81 entry->constant = f->constant;
82 entry->line = f->data.line;
83 entry->correct = val == expect;
84
85 if (!call_filter_check_discard(call, entry, buffer, event))
86 trace_buffer_unlock_commit_nostack(buffer, event);
87
88 out:
89 current->trace_recursion &= ~TRACE_BRANCH_BIT;
90 raw_local_irq_restore(flags);
91 }
92
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30105 bytes --]
next reply other threads:[~2021-02-17 4:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-17 4:16 kernel test robot [this message]
2021-02-18 9:42 ` [linux-rt-devel:linux-5.10.y-rt 250/279] kernel/trace/trace_branch.c:62:2: error: 'trace_ctx' undeclared; did you mean Sebastian Andrzej Siewior
2021-02-18 11:30 ` Chen, Rong A
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=202102171214.NADMwp5e-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.