All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [ash:perf-aux-sampling 5/20] arch/x86/events/intel/pt.c:495:2: note: in expansion of macro 'if'
Date: Tue, 22 Oct 2019 23:50:16 +0800	[thread overview]
Message-ID: <201910222314.PRtFXJ7h%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3629 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ash/linux.git perf-aux-sampling
head:   b08efd75924e19b3590a7fb607e266ad372dfa06
commit: d1f97c3e2169ac8cb52e8f57716b3e21d524536d [5/20] perf/x86/intel/pt: Opportunistically use single range output mode
config: x86_64-randconfig-a001-201942 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        git checkout d1f97c3e2169ac8cb52e8f57716b3e21d524536d
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/asm-generic/bug.h:5:0,
                    from arch/x86/include/asm/bug.h:83,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/gfp.h:5,
                    from include/linux/slab.h:15,
                    from arch/x86/events/intel/pt.c:16:
   arch/x86/events/intel/pt.c: In function 'pt_config':
   arch/x86/events/intel/pt.c:495:7: error: 'buf' undeclared (first use in this function); did you mean 'btf'?
     if (!buf->single)
          ^
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
    #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                       ^~~~
>> arch/x86/events/intel/pt.c:495:2: note: in expansion of macro 'if'
     if (!buf->single)
     ^~
   arch/x86/events/intel/pt.c:495:7: note: each undeclared identifier is reported only once for each function it appears in
     if (!buf->single)
          ^
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
    #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                       ^~~~
>> arch/x86/events/intel/pt.c:495:2: note: in expansion of macro 'if'
     if (!buf->single)
     ^~

vim +/if +495 arch/x86/events/intel/pt.c

   482	
   483	static void pt_config(struct perf_event *event)
   484	{
   485		u64 reg;
   486	
   487		/* First round: clear STATUS, in particular the PSB byte counter. */
   488		if (!event->hw.config) {
   489			perf_event_itrace_started(event);
   490			wrmsrl(MSR_IA32_RTIT_STATUS, 0);
   491		}
   492	
   493		reg = pt_config_filters(event);
   494		reg |= RTIT_CTL_TRACEEN;
 > 495		if (!buf->single)
   496			reg |= RTIT_CTL_TOPA;
   497	
   498		/*
   499		 * Previously, we had BRANCH_EN on by default, but now that PT has
   500		 * grown features outside of branch tracing, it is useful to allow
   501		 * the user to disable it. Setting bit 0 in the event's attr.config
   502		 * allows BRANCH_EN to pass through instead of being always on. See
   503		 * also the comment in pt_event_valid().
   504		 */
   505		if (event->attr.config & BIT(0)) {
   506			reg |= event->attr.config & RTIT_CTL_BRANCH_EN;
   507		} else {
   508			reg |= RTIT_CTL_BRANCH_EN;
   509		}
   510	
   511		if (!event->attr.exclude_kernel)
   512			reg |= RTIT_CTL_OS;
   513		if (!event->attr.exclude_user)
   514			reg |= RTIT_CTL_USR;
   515	
   516		reg |= (event->attr.config & PT_CONFIG_MASK);
   517	
   518		event->hw.config = reg;
   519		pt_config_start(event);
   520	}
   521	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 29316 bytes --]

                 reply	other threads:[~2019-10-22 15:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=201910222314.PRtFXJ7h%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.