* [PATCH] cpuidle: add tracepoint for enter_s2idle flow
@ 2025-05-20 3:09 qiwu.chen
2025-05-20 23:27 ` kernel test robot
2025-05-22 18:01 ` kernel test robot
0 siblings, 2 replies; 3+ messages in thread
From: qiwu.chen @ 2025-05-20 3:09 UTC (permalink / raw)
To: rafael, daniel.lezcano; +Cc: linux-pm, qiwu.chen
Add the tracepoint cpu_idle in enter_s2idle_proper for tracing
the enter and exit events with a determined idle state.
Signed-off-by: qiwu.chen <qiwu.chen@transsion.com>
---
drivers/cpuidle/cpuidle.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 0835da449db8..9ff8fa5db444 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -147,6 +147,7 @@ static noinstr void enter_s2idle_proper(struct cpuidle_driver *drv,
struct cpuidle_state *target_state = &drv->states[index];
ktime_t time_start, time_end;
+ trace_cpu_idle(index, dev->cpu);
instrumentation_begin();
time_start = ns_to_ktime(local_clock_noinstr());
@@ -178,6 +179,7 @@ static noinstr void enter_s2idle_proper(struct cpuidle_driver *drv,
dev->states_usage[index].s2idle_time += ktime_us_delta(time_end, time_start);
dev->states_usage[index].s2idle_usage++;
instrumentation_end();
+ trace_cpu_idle(PWR_EVENT_EXIT, dev->cpu);
}
/**
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cpuidle: add tracepoint for enter_s2idle flow
2025-05-20 3:09 [PATCH] cpuidle: add tracepoint for enter_s2idle flow qiwu.chen
@ 2025-05-20 23:27 ` kernel test robot
2025-05-22 18:01 ` kernel test robot
1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2025-05-20 23:27 UTC (permalink / raw)
To: qiwu.chen, rafael, daniel.lezcano
Cc: llvm, oe-kbuild-all, linux-pm, qiwu.chen
Hi qiwu.chen,
kernel test robot noticed the following build warnings:
[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on rafael-pm/bleeding-edge amd-pstate/linux-next amd-pstate/bleeding-edge linus/master v6.15-rc7 next-20250516]
[cannot apply to daniel-lezcano/clockevents/next]
[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/qiwu-chen/cpuidle-add-tracepoint-for-enter_s2idle-flow/20250520-111031
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
patch link: https://lore.kernel.org/r/20250520030922.9505-1-qiwu.chen%40transsion.com
patch subject: [PATCH] cpuidle: add tracepoint for enter_s2idle flow
config: x86_64-randconfig-075-20250521 (https://download.01.org/0day-ci/archive/20250521/202505210727.H0ZDt9ng-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250521/202505210727.H0ZDt9ng-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/202505210727.H0ZDt9ng-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> vmlinux.o: warning: objtool: enter_s2idle_proper+0x34: call to trace_cpu_idle() leaves .noinstr.text section
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cpuidle: add tracepoint for enter_s2idle flow
2025-05-20 3:09 [PATCH] cpuidle: add tracepoint for enter_s2idle flow qiwu.chen
2025-05-20 23:27 ` kernel test robot
@ 2025-05-22 18:01 ` kernel test robot
1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2025-05-22 18:01 UTC (permalink / raw)
To: qiwu.chen, rafael, daniel.lezcano; +Cc: oe-kbuild-all, linux-pm, qiwu.chen
Hi qiwu.chen,
kernel test robot noticed the following build errors:
[auto build test ERROR on rafael-pm/linux-next]
[also build test ERROR on rafael-pm/bleeding-edge amd-pstate/linux-next amd-pstate/bleeding-edge linus/master v6.15-rc7 next-20250522]
[cannot apply to daniel-lezcano/clockevents/next]
[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/qiwu-chen/cpuidle-add-tracepoint-for-enter_s2idle-flow/20250520-111031
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
patch link: https://lore.kernel.org/r/20250520030922.9505-1-qiwu.chen%40transsion.com
patch subject: [PATCH] cpuidle: add tracepoint for enter_s2idle flow
config: x86_64-randconfig-071-20250522 (https://download.01.org/0day-ci/archive/20250523/202505230118.SHsiPbMH-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250523/202505230118.SHsiPbMH-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/202505230118.SHsiPbMH-lkp@intel.com/
All errors (new ones prefixed by >>):
>> vmlinux.o: error: objtool: enter_s2idle_proper+0x2f: call to trace_cpu_idle() leaves .noinstr.text section
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-22 18:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-20 3:09 [PATCH] cpuidle: add tracepoint for enter_s2idle flow qiwu.chen
2025-05-20 23:27 ` kernel test robot
2025-05-22 18:01 ` kernel test robot
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.