From: kbuild test robot <lkp@intel.com>
To: linxiulei@gmail.com
Cc: kbuild-all@01.org, peterz@infradead.org, jolsa@redhat.com,
mingo@redhat.com, acme@kernel.org,
alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org,
tglx@linutronix.de, eranian@gmail.com,
torvalds@linux-foundation.org, linux-perf-users@vger.kernel.org,
brendan.d.gregg@gmail.com, yang_oliver@hotmail.com,
jinli.zjl@alibaba-inc.com,
"leilei.lin" <leilei.lin@alibaba-inc.com>
Subject: Re: [PATCH RESEND v3] perf/core: Fix installing cgroup event into cpu
Date: Sat, 3 Feb 2018 14:52:43 +0800 [thread overview]
Message-ID: <201802031429.s2RwvhvF%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180131083527.76989-1-linxiulei@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3831 bytes --]
Hi leilei.lin,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on tip/perf/core]
[also build test ERROR on v4.15 next-20180202]
[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/linxiulei-gmail-com/perf-core-Fix-installing-cgroup-event-into-cpu/20180203-133110
config: i386-randconfig-s0-201804 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
kernel/events/core.c: In function '__perf_install_in_context':
>> kernel/events/core.c:2332:10: error: implicit declaration of function 'perf_cgroup_from_task' [-Werror=implicit-function-declaration]
cgrp = perf_cgroup_from_task(current, ctx);
^~~~~~~~~~~~~~~~~~~~~
kernel/events/core.c:2332:8: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
cgrp = perf_cgroup_from_task(current, ctx);
^
kernel/events/core.c:2333:40: error: dereferencing pointer to incomplete type 'struct perf_cgroup'
reprogram = cgroup_is_descendant(cgrp->css.cgroup,
^~
kernel/events/core.c:2334:11: error: 'struct perf_event' has no member named 'cgrp'
event->cgrp->css.cgroup);
^~
cc1: some warnings being treated as errors
vim +/perf_cgroup_from_task +2332 kernel/events/core.c
2284
2285 /*
2286 * Cross CPU call to install and enable a performance event
2287 *
2288 * Very similar to remote_function() + event_function() but cannot assume that
2289 * things like ctx->is_active and cpuctx->task_ctx are set.
2290 */
2291 static int __perf_install_in_context(void *info)
2292 {
2293 struct perf_event *event = info;
2294 struct perf_event_context *ctx = event->ctx;
2295 struct perf_cpu_context *cpuctx = __get_cpu_context(ctx);
2296 struct perf_event_context *task_ctx = cpuctx->task_ctx;
2297 struct perf_cgroup *cgrp;
2298 bool reprogram = true;
2299 int ret = 0;
2300
2301 raw_spin_lock(&cpuctx->ctx.lock);
2302 if (ctx->task) {
2303 raw_spin_lock(&ctx->lock);
2304 task_ctx = ctx;
2305
2306 reprogram = (ctx->task == current);
2307
2308 /*
2309 * If the task is running, it must be running on this CPU,
2310 * otherwise we cannot reprogram things.
2311 *
2312 * If its not running, we don't care, ctx->lock will
2313 * serialize against it becoming runnable.
2314 */
2315 if (task_curr(ctx->task) && !reprogram) {
2316 ret = -ESRCH;
2317 goto unlock;
2318 }
2319
2320 WARN_ON_ONCE(reprogram && cpuctx->task_ctx && cpuctx->task_ctx != ctx);
2321 } else if (task_ctx) {
2322 raw_spin_lock(&task_ctx->lock);
2323 }
2324
2325 if (is_cgroup_event(event)) {
2326 /*
2327 * Only care about cgroup events.
2328 *
2329 * If only the task belongs to cgroup of this event,
2330 * we will continue the installment
2331 */
> 2332 cgrp = perf_cgroup_from_task(current, ctx);
2333 reprogram = cgroup_is_descendant(cgrp->css.cgroup,
2334 event->cgrp->css.cgroup);
2335 }
2336
2337 if (reprogram) {
2338 ctx_sched_out(ctx, cpuctx, EVENT_TIME);
2339 add_event_to_ctx(event, ctx);
2340 ctx_resched(cpuctx, task_ctx, get_event_type(event));
2341 } else {
2342 add_event_to_ctx(event, ctx);
2343 }
2344
2345 unlock:
2346 perf_ctx_unlock(cpuctx, task_ctx);
2347
2348 return ret;
2349 }
2350
---
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: 30878 bytes --]
prev parent reply other threads:[~2018-02-03 6:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-31 8:35 linxiulei
2018-02-03 5:58 ` kbuild test robot
2018-02-03 6:52 ` kbuild test robot [this message]
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=201802031429.s2RwvhvF%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=brendan.d.gregg@gmail.com \
--cc=eranian@gmail.com \
--cc=jinli.zjl@alibaba-inc.com \
--cc=jolsa@redhat.com \
--cc=kbuild-all@01.org \
--cc=leilei.lin@alibaba-inc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linxiulei@gmail.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=yang_oliver@hotmail.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
all inboxes | Powered by JetHome®