All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Song Liu <songliubraving@fb.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, Song Liu <songliubraving@fb.com>,
	acme@kernel.org, ast@kernel.org, daniel@iogearbox.net,
	kernel-team@fb.com, peterz@infradead.org
Subject: Re: [PATCH v2 perf,bpf 1/3] perf, bpf: Introduce PERF_RECORD_BPF_EVENT
Date: Fri, 7 Dec 2018 09:34:06 +0800	[thread overview]
Message-ID: <201812070956.5ccRmhzi%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181204195355.4079788-2-songliubraving@fb.com>

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

Hi Song,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tip/perf/core]
[also build test ERROR on v4.20-rc5 next-20181206]
[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/Song-Liu/perf-bpf-Introduce-PERF_RECORD_BPF_EVENT/20181207-083615
config: i386-randconfig-x070-201848 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   kernel/events/core.c: In function 'perf_event_bpf_output':
>> kernel/events/core.c:7694:2: error: implicit declaration of function 'bpf_get_prog_name'; did you mean 'bpf_prog_free'? [-Werror=implicit-function-declaration]
     bpf_get_prog_name(bpf_event->prog, name);
     ^~~~~~~~~~~~~~~~~
     bpf_prog_free
   kernel/events/core.c: In function 'perf_event_bpf_event_subprog':
>> kernel/events/core.c:7737:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
       .addr = (u64)prog->bpf_func,
               ^
   cc1: some warnings being treated as errors

vim +7694 kernel/events/core.c

  7679	
  7680	static void perf_event_bpf_output(struct perf_event *event,
  7681					   void *data)
  7682	{
  7683		struct perf_bpf_event *bpf_event = data;
  7684		struct perf_output_handle handle;
  7685		struct perf_sample_data sample;
  7686		char name[KSYM_NAME_LEN];
  7687		int name_len;
  7688		int ret;
  7689	
  7690		if (!perf_event_bpf_match(event))
  7691			return;
  7692	
  7693		/* get prog name and round up to 64 bit aligned */
> 7694		bpf_get_prog_name(bpf_event->prog, name);
  7695		name_len = strlen(name) + 1;
  7696		while (!IS_ALIGNED(name_len, sizeof(u64)))
  7697			name[name_len++] = '\0';
  7698		bpf_event->event_id.len += name_len;
  7699	
  7700		perf_event_header__init_id(&bpf_event->event_id.header, &sample, event);
  7701		ret = perf_output_begin(&handle, event,
  7702					bpf_event->event_id.header.size);
  7703		if (ret)
  7704			return;
  7705	
  7706		perf_output_put(&handle, bpf_event->event_id);
  7707	
  7708		__output_copy(&handle, name, name_len);
  7709	
  7710		perf_event__output_id_sample(event, &handle, &sample);
  7711	
  7712		perf_output_end(&handle);
  7713	}
  7714	
  7715	static void perf_event_bpf(struct perf_bpf_event *bpf_event)
  7716	{
  7717		perf_iterate_sb(perf_event_bpf_output,
  7718			       bpf_event,
  7719			       NULL);
  7720	}
  7721	
  7722	static void perf_event_bpf_event_subprog(
  7723		enum perf_bpf_event_type type,
  7724		struct bpf_prog *prog, u32 id, u32 sub_id)
  7725	{
  7726		struct perf_bpf_event bpf_event = (struct perf_bpf_event){
  7727			.prog = prog,
  7728			.event_id = {
  7729				.header = {
  7730					.type = PERF_RECORD_BPF_EVENT,
  7731					.size = sizeof(bpf_event.event_id),
  7732				},
  7733				.type = type,
  7734				/* .flags = 0 */
  7735				.id = id,
  7736				.sub_id = sub_id,
> 7737				.addr = (u64)prog->bpf_func,
  7738				.len = prog->jited_len,
  7739			},
  7740		};
  7741	
  7742		memcpy(bpf_event.event_id.tag, prog->tag, BPF_TAG_SIZE);
  7743		perf_event_bpf(&bpf_event);
  7744	}
  7745	

---
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: 31160 bytes --]

  reply	other threads:[~2018-12-07  1:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-04 19:53 [PATCH v2 perf,bpf 0/3] reveal invisible bpf programs Song Liu
2018-12-04 19:53 ` [PATCH v2 perf,bpf 1/3] perf, bpf: Introduce PERF_RECORD_BPF_EVENT Song Liu
2018-12-07  1:34   ` kbuild test robot [this message]
2018-12-08 18:06   ` kbuild test robot
2018-12-04 19:53 ` [PATCH v2 perf,bpf 2/3] perf: sync tools/include/uapi/linux/perf_event.h Song Liu
2018-12-04 19:53 ` [PATCH v2 perf,bpf 3/3] perf util: basic handling of PERF_RECORD_BPF_EVENT Song Liu

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=201812070956.5ccRmhzi%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=acme@kernel.org \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kbuild-all@01.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --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 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.