pkarashchenko commented on code in PR #11348: URL: https://github.com/apache/nuttx/pull/11348#discussion_r1420951511
########## arch/xtensa/src/esp32s3/esp32s3_start.c: ########## @@ -170,7 +170,7 @@ uint32_t g_idlestack[IDLETHREAD_STACKWORDS] * ****************************************************************************/ -static void IRAM_ATTR configure_cpu_caches(void) +noinstrument_function static void IRAM_ATTR configure_cpu_caches(void) Review Comment: ```suggestion noinstrument_function static void IRAM_ATTR configure_cpu_caches(void) ``` ########## arch/arm/include/irq.h: ########## @@ -116,7 +116,7 @@ EXTERN volatile uint32_t *g_current_regs[CONFIG_SMP_NCPUS]; ****************************************************************************/ #ifdef CONFIG_SMP -int up_cpu_index(void); +int up_cpu_index(void) noinstrument_function ; Review Comment: ```suggestion int up_cpu_index(void) noinstrument_function; ``` ########## include/nuttx/instrument.h: ########## @@ -0,0 +1,68 @@ +/**************************************************************************** + * include/nuttx/instrument.h + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +#ifndef __INCLUDE_NUTTX_INSTRUMENT_H +#define __INCLUDE_NUTTX_INSTRUMENT_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include <nuttx/compiler.h> +#include <nuttx/queue.h> + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +typedef CODE void (instrument_fun_t)(FAR void *this_fn, + FAR void *call_site, + FAR void *arg); + +struct instrument_s +{ + sq_entry_t entry; + instrument_fun_t *enter; + instrument_fun_t *leave; Review Comment: ```suggestion FAR instrument_fun_t *enter; FAR instrument_fun_t *leave; ``` ########## sched/instrument/instrument.h: ########## @@ -0,0 +1,43 @@ +/**************************************************************************** + * sched/instrument/instrument.h + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +#ifndef __SCHED_INSTRUMENT_INSTRUMENT_H +#define __SCHED_INSTRUMENT_INSTRUMENT_H + +/**************************************************************************** + * Public Functions prototypes + ****************************************************************************/ + +/**************************************************************************** + * Name: instrument_initialize + * + * Description: + * This function is called to initialize all the instrument functions + * + * Input Parameters: + * None + * + * Returned Value: + * Does not return. + * + ****************************************************************************/ + +void instrument_initialize(void); +#endif Review Comment: ```suggestion void instrument_initialize(void); #endif ``` -- 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]
