mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-09-29 10:34:30 +00:00
perf_gettime() and perf_getfreq() are kernel functions, defined in sched/clock/clock_perf.c. Neither appears in syscall.csv, and libc supplies only perf_gettime(), under CONFIG_ARCH_HAVE_PERF_EVENTS_USER_ACCESS. So a protected or kernel build cannot resolve either of them from user space: ostest/perf_gettime.c:91: undefined reference to `perf_gettime' ostest/perf_gettime.c:184: undefined reference to `perf_getfreq' make[1]: *** [nuttx_user.elf] Error 1 The call in user_main() is guarded by CONFIG_ARCH_PERF_EVENTS && !CONFIG_ARCH_PERF_EVENTS_USER_ACCESS -- which is exactly the case where the symbols are kernel-only -- so every such configuration fails to link. mps3-an547:knsh is one: it sets CONFIG_SCHED_IRQMONITOR, which makes ARCH_PERF_EVENTS default y. mps2-an521:knsh escapes only because it sets neither monitor, leaving ARCH_PERF_EVENTS off, so the call compiles out and the archive member is never pulled in. Require CONFIG_BUILD_FLAT, where ostest links against the kernel's own copy. No configuration that runs the test today stops running it. Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com> Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| aio.c | ||
| barrier.c | ||
| cancel.c | ||
| CMakeLists.txt | ||
| cond.c | ||
| dev_null.c | ||
| fpu.c | ||
| getopt.c | ||
| hrtimer.c | ||
| Kconfig | ||
| libc_memmem.c | ||
| Make.defs | ||
| Makefile | ||
| mqueue.c | ||
| multiuser.c | ||
| mutex.c | ||
| nsem.c | ||
| nxevent.c | ||
| ostest.h | ||
| ostest_main.c | ||
| perf_gettime.c | ||
| posixtimer.c | ||
| prioinherit.c | ||
| pthread_cleanup.c | ||
| pthread_exit.c | ||
| pthread_rwlock.c | ||
| pthread_rwlock_cancel.c | ||
| restart.c | ||
| rmutex.c | ||
| robust.c | ||
| roundrobin.c | ||
| sched_thread_local.c | ||
| schedlock.c | ||
| sem.c | ||
| semtimed.c | ||
| setjmp.c | ||
| setvbuf.c | ||
| sigev_thread.c | ||
| sighand.c | ||
| sighelper.c | ||
| signest.c | ||
| sigprocmask.c | ||
| smp_call.c | ||
| specific.c | ||
| spinlock.c | ||
| sporadic.c | ||
| sporadic2.c | ||
| suspend.c | ||
| timedmqueue.c | ||
| timedmutex.c | ||
| timedwait.c | ||
| tls.c | ||
| vfork.c | ||
| waitpid.c | ||
| wdog.c | ||
| wqueue.c | ||