public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Song Liu <songliubraving@fb.com>,
	bpf@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, acme@kernel.org, peterz@infradead.org,
	mingo@redhat.com, kjain@linux.ibm.com, kernel-team@fb.com,
	Song Liu <songliubraving@fb.com>
Subject: Re: [PATCH v3 bpf-next 2/3] bpf: introduce helper bpf_get_branch_snapshot
Date: Tue, 31 Aug 2021 19:16:12 +0800	[thread overview]
Message-ID: <202108311901.yuHviHw4-lkp@intel.com> (raw)
In-Reply-To: <20210830214106.4142056-3-songliubraving@fb.com>

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

Hi Song,

I love your patch! Yet something to improve:

[auto build test ERROR on bpf-next/master]

url:    https://github.com/0day-ci/linux/commits/Song-Liu/bpf-introduce-bpf_get_branch_snapshot/20210831-054455
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-randconfig-a003-20210831 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/09548da8ea3e9a75d0d969b18c148ce17ed1c97d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Song-Liu/bpf-introduce-bpf_get_branch_snapshot/20210831-054455
        git checkout 09548da8ea3e9a75d0d969b18c148ce17ed1c97d
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   ld: kernel/bpf/trampoline.o: in function `__bpf_prog_enter':
>> kernel/bpf/trampoline.c:578: undefined reference to `bpf_perf_branch_snapshot'


vim +578 kernel/bpf/trampoline.c

   551	
   552	/* The logic is similar to bpf_prog_run(), but with an explicit
   553	 * rcu_read_lock() and migrate_disable() which are required
   554	 * for the trampoline. The macro is split into
   555	 * call __bpf_prog_enter
   556	 * call prog->bpf_func
   557	 * call __bpf_prog_exit
   558	 *
   559	 * __bpf_prog_enter returns:
   560	 * 0 - skip execution of the bpf prog
   561	 * 1 - execute bpf prog
   562	 * [2..MAX_U64] - execute bpf prog and record execution time.
   563	 *     This is start time.
   564	 */
   565	u64 notrace __bpf_prog_enter(struct bpf_prog *prog)
   566		__acquires(RCU)
   567	{
   568	#ifdef CONFIG_PERF_EVENTS
   569		/* Calling migrate_disable costs two entries in the LBR. To save
   570		 * some entries, we call perf_snapshot_branch_stack before
   571		 * migrate_disable to save some entries. This is OK because we
   572		 * care about the branch trace before entering the BPF program.
   573		 * If migrate happens exactly here, there isn't much we can do to
   574		 * preserve the data.
   575		 */
   576		if (prog->call_get_branch)
   577			static_call(perf_snapshot_branch_stack)(
 > 578				this_cpu_ptr(&bpf_perf_branch_snapshot));
   579	#endif
   580		rcu_read_lock();
   581		migrate_disable();
   582		if (unlikely(__this_cpu_inc_return(*(prog->active)) != 1)) {
   583			inc_misses_counter(prog);
   584			return 0;
   585		}
   586		return bpf_prog_start_time();
   587	}
   588	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

  parent reply	other threads:[~2021-08-31 11:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-30 21:41 [PATCH v3 bpf-next 0/3] bpf: introduce bpf_get_branch_snapshot Song Liu
2021-08-30 21:41 ` [PATCH v3 bpf-next 1/3] perf: enable branch record for software events Song Liu
2021-08-30 22:05   ` Andrii Nakryiko
2021-08-31 15:24   ` Peter Zijlstra
2021-08-31 16:12     ` Song Liu
2021-08-30 21:41 ` [PATCH v3 bpf-next 2/3] bpf: introduce helper bpf_get_branch_snapshot Song Liu
2021-08-30 22:14   ` Andrii Nakryiko
2021-08-31 11:16   ` kernel test robot [this message]
2021-08-31 15:32   ` Peter Zijlstra
2021-08-31 16:41     ` Song Liu
2021-08-31 21:24       ` Song Liu
2021-08-31 21:37         ` Alexei Starovoitov
2021-08-30 21:41 ` [PATCH v3 bpf-next 3/3] selftests/bpf: add test for bpf_get_branch_snapshot Song Liu
2021-08-30 22:28   ` Andrii Nakryiko

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=202108311901.yuHviHw4-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=acme@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kernel-team@fb.com \
    --cc=kjain@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=songliubraving@fb.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox