casaroli commented on code in PR #21428:
URL: https://github.com/apache/nuttx/pull/21428#discussion_r4509885754


##########
sched/clock/clock_perf.c:
##########
@@ -32,13 +32,24 @@
 #include <nuttx/sched.h>
 #include <nuttx/wdog.h>
 
-#ifndef CONFIG_ARCH_PERF_EVENTS_USER_ACCESS
-
 /****************************************************************************
  * Preprocessors
  ****************************************************************************/
 
-#  if defined(CONFIG_PERF_OVERFLOW_CORRECTION) && ULONG_MAX != UINT64_MAX
+/* Use up_perf_*() only when they count: the arch counter runs only with

Review Comment:
   #21475 at 6c724c9a661 loses a counter wrap that happens before the first 
`perf_update()`: `perf_setup()` leaves `g_perf.last` at 0 (details in our 
review there). After that fix, #21428 rebases on it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to