mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 19:36:35 +08:00
arch: Flag all definitions of up_perf_* functions with CONFIG_ARCH_HAVE_PERF_EVENTS
Use the flag CONFIG_ARCH_HAVE_PERF_EVENTS to detect whether the architecture specific code provides the up_perf_* functions. Now it is mixed with CONFIG_ARCH_PERF_EVENTS, which should select just whether the perf events (perf_*) are enabled for the configuration. - drivers/timers/arch_alarm.c: Don't compile the up_perf_* functions here if the CONFIG_ARCH_HAVE_PERF_EVENTS is defined - arch/*/*_perf.c: Change CONFIG_ARCH_PERF_EVENTS -> CONFIG_ARCH_HAVE_PERF_EVENTS to select whether architecture specific up_perf_* functions are provided Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
This commit is contained in:
committed by
Xiang Xiao
parent
0b3cd35360
commit
56ad0d6837
@@ -31,7 +31,7 @@
|
|||||||
#include "arm_timer.h"
|
#include "arm_timer.h"
|
||||||
#include "sctlr.h"
|
#include "sctlr.h"
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_PERF_EVENTS
|
#ifdef CONFIG_ARCH_HAVE_PERF_EVENTS
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
#include "itm.h"
|
#include "itm.h"
|
||||||
#include "nvic.h"
|
#include "nvic.h"
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_PERF_EVENTS
|
#ifdef CONFIG_ARCH_HAVE_PERF_EVENTS
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
#include "arm_timer.h"
|
#include "arm_timer.h"
|
||||||
#include "sctlr.h"
|
#include "sctlr.h"
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_PERF_EVENTS
|
#ifdef CONFIG_ARCH_HAVE_PERF_EVENTS
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
#include "itm.h"
|
#include "itm.h"
|
||||||
#include "nvic.h"
|
#include "nvic.h"
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_PERF_EVENTS
|
#ifdef CONFIG_ARCH_HAVE_PERF_EVENTS
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
#include "arm_internal.h"
|
#include "arm_internal.h"
|
||||||
#include "sctlr.h"
|
#include "sctlr.h"
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_PERF_EVENTS
|
#ifdef CONFIG_ARCH_HAVE_PERF_EVENTS
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#include "arm64_pmu.h"
|
#include "arm64_pmu.h"
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_PERF_EVENTS
|
#ifdef CONFIG_ARCH_HAVE_PERF_EVENTS
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include "riscv_internal.h"
|
#include "riscv_internal.h"
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_PERF_EVENTS
|
#ifdef CONFIG_ARCH_HAVE_PERF_EVENTS
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include "riscv_internal.h"
|
#include "riscv_internal.h"
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_PERF_EVENTS
|
#ifdef CONFIG_ARCH_HAVE_PERF_EVENTS
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
#include "hardware/esp32c3_system.h"
|
#include "hardware/esp32c3_system.h"
|
||||||
#include "esp32c3_clockconfig.h"
|
#include "esp32c3_clockconfig.h"
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_PERF_EVENTS
|
#ifdef CONFIG_ARCH_HAVE_PERF_EVENTS
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include "x86_64_internal.h"
|
#include "x86_64_internal.h"
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_PERF_EVENTS
|
#ifdef CONFIG_ARCH_HAVE_PERF_EVENTS
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
#include "xtensa_counter.h"
|
#include "xtensa_counter.h"
|
||||||
#include "xtensa.h"
|
#include "xtensa.h"
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_PERF_EVENTS
|
#ifdef CONFIG_ARCH_HAVE_PERF_EVENTS
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ int weak_function up_alarm_tick_start(clock_t ticks)
|
|||||||
* units.
|
* units.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef CONFIG_ARCH_PERF_EVENTS
|
#ifndef CONFIG_ARCH_HAVE_PERF_EVENTS
|
||||||
void up_perf_init(FAR void *arg)
|
void up_perf_init(FAR void *arg)
|
||||||
{
|
{
|
||||||
UNUSED(arg);
|
UNUSED(arg);
|
||||||
|
|||||||
@@ -399,7 +399,7 @@ int weak_function up_timer_tick_start(clock_t ticks)
|
|||||||
* units.
|
* units.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef CONFIG_ARCH_PERF_EVENTS
|
#ifndef CONFIG_ARCH_HAVE_PERF_EVENTS
|
||||||
void up_perf_init(FAR void *arg)
|
void up_perf_init(FAR void *arg)
|
||||||
{
|
{
|
||||||
UNUSED(arg);
|
UNUSED(arg);
|
||||||
|
|||||||
Reference in New Issue
Block a user