From: kernel test robot <lkp@intel.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH RFC V2 4/4] coresight: Have a stab at support for pause / resume
Date: Sun, 10 Dec 2023 01:52:05 +0800 [thread overview]
Message-ID: <202312100131.QphwFtTa-lkp@intel.com> (raw)
In-Reply-To: <20231208172449.35444-5-adrian.hunter@intel.com>
Hi Adrian,
[This is a private test report for your RFC patch.]
kernel test robot noticed the following build errors:
[auto build test ERROR on perf-tools-next/perf-tools-next]
[also build test ERROR on tip/perf/core perf-tools/perf-tools linus/master v6.7-rc4 next-20231208]
[cannot apply to acme/perf/core]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Adrian-Hunter/perf-core-Add-aux_pause-aux_resume-aux_start_paused/20231209-013450
base: https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git perf-tools-next
patch link: https://lore.kernel.org/r/20231208172449.35444-5-adrian.hunter%40intel.com
patch subject: [PATCH RFC V2 4/4] coresight: Have a stab at support for pause / resume
config: arm-randconfig-002-20231209 (https://download.01.org/0day-ci/archive/20231210/202312100131.QphwFtTa-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231210/202312100131.QphwFtTa-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312100131.QphwFtTa-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/hwtracing/coresight/coresight-etm-perf.c: In function 'etm_event_start':
>> drivers/hwtracing/coresight/coresight-etm-perf.c:456:13: error: 'mode' undeclared (first use in this function); did you mean 'node'?
456 | if (mode & PERF_EF_RESUME) {
| ^~~~
| node
drivers/hwtracing/coresight/coresight-etm-perf.c:456:13: note: each undeclared identifier is reported only once for each function it appears in
vim +456 drivers/hwtracing/coresight/coresight-etm-perf.c
445
446 static void etm_event_start(struct perf_event *event, int flags)
447 {
448 int cpu = smp_processor_id();
449 struct etm_event_data *event_data;
450 struct etm_ctxt *ctxt = this_cpu_ptr(&etm_ctxt);
451 struct perf_output_handle *handle = &ctxt->handle;
452 struct coresight_device *sink, *csdev = per_cpu(csdev_src, cpu);
453 struct list_head *path;
454 u64 hw_id;
455
> 456 if (mode & PERF_EF_RESUME) {
457 if (!READ_ONCE(ctxt->pr_allowed))
458 return;
459 } else if (READ_ONCE(event->aux_paused)) {
460 goto out_pr_allowed;
461 }
462
463 if (!csdev)
464 goto fail;
465
466 /* Have we messed up our tracking ? */
467 if (WARN_ON(ctxt->event_data))
468 goto fail;
469
470 /*
471 * Deal with the ring buffer API and get a handle on the
472 * session's information.
473 */
474 event_data = perf_aux_output_begin(handle, event);
475 if (!event_data)
476 goto fail;
477
478 /*
479 * Check if this ETM is allowed to trace, as decided
480 * at etm_setup_aux(). This could be due to an unreachable
481 * sink from this ETM. We can't do much in this case if
482 * the sink was specified or hinted to the driver. For
483 * now, simply don't record anything on this ETM.
484 *
485 * As such we pretend that everything is fine, and let
486 * it continue without actually tracing. The event could
487 * continue tracing when it moves to a CPU where it is
488 * reachable to a sink.
489 */
490 if (!cpumask_test_cpu(cpu, &event_data->mask))
491 goto out;
492
493 path = etm_event_cpu_path(event_data, cpu);
494 /* We need a sink, no need to continue without one */
495 sink = coresight_get_sink(path);
496 if (WARN_ON_ONCE(!sink))
497 goto fail_end_stop;
498
499 /* Nothing will happen without a path */
500 if (coresight_enable_path(path, CS_MODE_PERF, handle))
501 goto fail_end_stop;
502
503 /* Finally enable the tracer */
504 if (coresight_enable_source(csdev, CS_MODE_PERF, event))
505 goto fail_disable_path;
506
507 /*
508 * output cpu / trace ID in perf record, once for the lifetime
509 * of the event.
510 */
511 if (!cpumask_test_cpu(cpu, &event_data->aux_hwid_done)) {
512 cpumask_set_cpu(cpu, &event_data->aux_hwid_done);
513 hw_id = FIELD_PREP(CS_AUX_HW_ID_VERSION_MASK,
514 CS_AUX_HW_ID_CURR_VERSION);
515 hw_id |= FIELD_PREP(CS_AUX_HW_ID_TRACE_ID_MASK,
516 coresight_trace_id_read_cpu_id(cpu));
517 perf_report_aux_output_id(event, hw_id);
518 }
519
520 out:
521 /* Tell the perf core the event is alive */
522 event->hw.state = 0;
523 /* Save the event_data for this ETM */
524 ctxt->event_data = event_data;
525 out_pr_allowed:
526 WRITE_ONCE(ctxt->pr_allowed, 1);
527 return;
528
529 fail_disable_path:
530 coresight_disable_path(path);
531 fail_end_stop:
532 /*
533 * Check if the handle is still associated with the event,
534 * to handle cases where if the sink failed to start the
535 * trace and TRUNCATED the handle already.
536 */
537 if (READ_ONCE(handle->event)) {
538 perf_aux_output_flag(handle, PERF_AUX_FLAG_TRUNCATED);
539 perf_aux_output_end(handle, 0);
540 }
541 fail:
542 event->hw.state = PERF_HES_STOPPED;
543 WRITE_ONCE(ctxt->pr_allowed, 0);
544 return;
545 }
546
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-12-09 17:53 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-08 17:24 [PATCH RFC V2 0/4] perf/core: Add ability for an event to "pause" or "resume" AUX area tracing Adrian Hunter
2023-12-08 17:24 ` Adrian Hunter
2023-12-08 17:24 ` [PATCH RFC V2 1/4] perf/core: Add aux_pause, aux_resume, aux_start_paused Adrian Hunter
2023-12-08 17:24 ` Adrian Hunter
2023-12-19 13:42 ` Arnaldo Carvalho de Melo
2023-12-19 13:42 ` Arnaldo Carvalho de Melo
2023-12-20 15:54 ` James Clark
2023-12-20 15:54 ` James Clark
2023-12-20 16:16 ` Adrian Hunter
2023-12-20 16:16 ` Adrian Hunter
2023-12-21 10:05 ` James Clark
2023-12-21 10:05 ` James Clark
2023-12-20 17:41 ` Suzuki K Poulose
2023-12-20 17:41 ` Suzuki K Poulose
2024-01-05 12:57 ` Adrian Hunter
2024-01-05 12:57 ` Adrian Hunter
2023-12-08 17:24 ` [PATCH RFC V2 2/4] perf/x86/intel/pt: Add support for pause / resume Adrian Hunter
2023-12-08 17:24 ` Adrian Hunter
2023-12-08 17:24 ` [PATCH RFC V2 3/4] perf tools: Add support for AUX area " Adrian Hunter
2023-12-08 17:24 ` Adrian Hunter
2023-12-08 17:24 ` [PATCH RFC V2 4/4] coresight: Have a stab at support for " Adrian Hunter
2023-12-08 17:24 ` Adrian Hunter
2023-12-09 17:52 ` kernel test robot [this message]
2023-12-15 6:42 ` [PATCH RFC V3 " Adrian Hunter
2023-12-15 6:42 ` Adrian Hunter
2023-12-20 15:59 ` James Clark
2023-12-20 15:59 ` James Clark
2024-01-05 12:56 ` Adrian Hunter
2024-01-05 12:56 ` Adrian Hunter
2023-12-19 6:05 ` [PATCH RFC V2 0/4] perf/core: Add ability for an event to "pause" or "resume" AUX area tracing Adrian Hunter
2023-12-19 6:05 ` Adrian Hunter
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=202312100131.QphwFtTa-lkp@intel.com \
--to=lkp@intel.com \
--cc=adrian.hunter@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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.