summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a9ceef7)
raw | patch | inline | side by side (parent: a9ceef7)
author | Hao Zhang <hzhang@ti.com> | |
Mon, 16 Apr 2018 14:07:55 +0000 (10:07 -0400) | ||
committer | Hao Zhang <hzhang@ti.com> | |
Mon, 16 Apr 2018 14:07:55 +0000 (10:07 -0400) |
Signed-off-by: Hao Zhang <hzhang@ti.com>
profiling/build/makefile_profile.mk | patch | blob | history | |
profiling/package.xs | patch | blob | history | |
profiling/profiling_component.mk | patch | blob | history | |
profiling/profilingver.h | patch | blob | history | |
profiling/src/Module.xs | patch | blob | history | |
profiling/src/profilingHooksArmV8.c | [new file with mode: 0644] | patch | blob |
profiling/src/profilingHooksR5.c | [new file with mode: 0644] | patch | blob |
index 7ef3e6fff27c2a1be3475b751e402edea84c411b..9652b521ca116df2765606e0e318f6d606b33d15 100644 (file)
#
-# Copyright (c) 2016, Texas Instruments Incorporated
+# Copyright (c) 2016 - 2018, Texas Instruments Incorporated
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
INCDIR = . src
# Common source files across all platforms and cores
-ifeq ($(CORE),$(filter $(CORE), a15_0 a9host a8host))
+ifeq ($(CORE),$(filter $(CORE), mpu1_0))
+ SRCS_COMMON += profilingHooksArmV8.c
+else ifeq ($(CORE),$(filter $(CORE), mcu1_0))
+ SRCS_COMMON += profilingHooksR5.c
+else ifeq ($(CORE),$(filter $(CORE), a15_0 a9host a8host))
SRCS_COMMON += profilingHooksArmV7_A.c
SRCS_ASM_COMMON += profilingHooksArmV7_AAssembly.asm
else ifeq ($(CORE),$(filter $(CORE), c66x))
SRCS_COMMON += profilingHooksM4.c
endif
-ifeq ($(CORE),$(filter $(CORE), a15_0 a9host a8host))
+ifeq ($(CORE),$(filter $(CORE), mpu1_0 a15_0 a9host a8host))
CFLAGS_LOCAL_COMMON = $(PDK_CFLAGS) -finstrument-functions -gdwarf-3 -g -D_ENABLE_BM
else
CFLAGS_LOCAL_COMMON = $(PDK_CFLAGS) --entry_parm=address --exit_hook=ti_utils_exit --exit_parm=address --entry_hook=ti_utils_entry -g -D_ENABLE_BM
# List all the external components/interfaces, whose interface header files
# need to be included for this component
INCLUDE_EXTERNAL_INTERFACES = pdk edma
+ifeq ($(CORE),$(filter $(CORE), mcu1_0))
+INCLUDE_EXTERNAL_INTERFACES += csl
+endif
PACKAGE_SRCS_COMMON = makefile profilingHooks.h profiling_component.mk profiling_osal.h \
docs/ReleaseNotes_Utils.pdf src build/makefile_profile.mk \
diff --git a/profiling/package.xs b/profiling/package.xs
index 4f73ce49a4d8cb7b165be26e2f026f7362499118..34373f9604b1f389e1e3e881f8baf67ae4678651 100644 (file)
--- a/profiling/package.xs
+++ b/profiling/package.xs
lib = lib + "/a9";
else if (java.lang.String(suffix).contains('a8') )
lib = lib + "/a8";
+ else if (java.lang.String(suffix).contains('a53'))
+ lib = lib + "/a53";
+ else if (java.lang.String(suffix).contains('r5f'))
+ lib = lib + "/r5f";
else
throw new Error("\tUnknown target for: " + this.packageBase + lib);
index 1342904eba572150641f44650dac1eec69377c8a..f6a0e73d65a42bf02dcc7458c39dafd545e6f015 100644 (file)
#
-# Copyright (c) 2016, Texas Instruments Incorporated
+# Copyright (c) 2016 - 2018, Texas Instruments Incorporated
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
ifeq ($(profiling_component_make_include), )
# under other list
-drvprofiling_SOCLIST = tda2xx tda2ex tda3xx dra75x dra78x am572x am574x am571x k2h k2k k2l k2e k2g c6678 c6657 am437x am335x
+drvprofiling_SOCLIST = tda2xx tda2ex tda3xx dra75x dra78x am572x am574x am571x k2h k2k k2l k2e k2g c6678 c6657 am437x am335x am65xx
drvprofiling_tda2xx_CORELIST = c66x a15_0 ipu1_0
drvprofiling_tda2ex_CORELIST = c66x a15_0 ipu1_0
drvprofiling_tda3xx_CORELIST = c66x ipu1_0
drvprofiling_c6657_CORELIST = c66x
drvprofiling_am437x_CORELIST = a9host
drvprofiling_am335x_CORELIST = a8host
+drvprofiling_am65xx_CORELIST = mpu1_0 mcu1_0
############################
# profiling package
index 87599d08392800de229dfdef50f08015f6413248..65861f59128d78b6dd3af3e4c4951917d171701f 100644 (file)
--- a/profiling/profilingver.h
+++ b/profiling/profilingver.h
* the following format:
* 0xAABBCCDD -> Arch (AA); API Changes (BB); Major (CC); Minor (DD)
*/
-#define UTILS_VERSION_ID (0x01000005)
+#define UTILS_VERSION_ID (0x01000006)
/**
* @brief This is the version string which describes the Utilities Tool along
* with the date and build information.
*/
-#define UTILS_VERSION_STR "Utilities Tool Revision: 01.00.00.05"
+#define UTILS_VERSION_STR "Utilities Tool Revision: 01.00.00.06"
#ifdef __cplusplus
index 45fc477df26e8ca2f5d0e0a6557e5e0cbc35ac51..78bc3399dc7f74e3b6f1e23581f2430ee8822c23 100644 (file)
--- a/profiling/src/Module.xs
+++ b/profiling/src/Module.xs
"src/profilingHooksArmV7_A.c",
"src/profilingHooksArmV7_AAssembly.asm",
"src/profilingHooksM4.c",
- "src/profilingHooksC66.c"
+ "src/profilingHooksC66.c",
+ "src/profilingHooksArmV8_A.c",
+ "src/profilingHooksR5.c"
];
/**************************************************************************
diff --git a/profiling/src/profilingHooksArmV8.c b/profiling/src/profilingHooksArmV8.c
--- /dev/null
@@ -0,0 +1,223 @@
+/*
+ * Copyright (c) 2018, Texas Instruments Incorporated
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+/**
+ * @file profilingHooksA15.c
+ *
+ * @brief ARM Implementations of the runtime programming hooks of the Processor SDK Profiling Tool.
+ *
+ * For more information, see:
+ * - @subpage profCCS
+ * - @subpage profDSS
+ *
+ * ## Usage ##
+ *
+ * Applications that are included in a profiling session must set these
+ * compiler flags for the desired platform:
+ * - ARM: `-finstrument-functions -gdwarf-3 -g`
+ * - DSP: `--entry_parm=address --exit_hook=ti_utils_exit --exit_parm=address --entry_hook=ti_utils_entry -g`
+ * - M4: `--entry_parm=address --exit_hook=ti_utils_exit --exit_parm=address --entry_hook=ti_utils_entry -g`
+ *
+ * For best results, ensure that the optimization levels are consistent between
+ * the library and the project (typically -O3, or optimization level 3).
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include "profilingHooks.h"
+#include "profiling_osal.h"
+
+
+int32_t CurrentTaskHookSetId, MaxTaskHookSetId;
+
+/*!
+ * @brief Maximum log count
+ *
+ * This is a predefined value to indicate when the instrumentation hooks should
+ * stop logging data. This is important for applications that have long polling
+ * loops or a device that has a small cache.
+ */
+#define MAX_LOG (1U*1024U*1024U)
+
+uint32_t log_idx = 0;
+
+/*!
+ * @brief Utils profiling log structure
+ *
+ * Utils log elements have a predefined structure of four words (to avoid the
+ * need of malloc) and are stored in an array of predefined length, `elemlog`.
+ */
+typedef struct{
+ /*! Indicates either enter or exit */
+ int32_t isEnter;
+ /*! Pointer address of the function in current context */
+ int32_t this_fn;
+ /*! Optional: Pointer address of calling function in current context */
+ int32_t call_site;
+ /*! Timestamp of the entry or exit */
+ uint32_t timestamp;
+}utilsProfilingElem;
+
+utilsProfilingElem elemlog[MAX_LOG] = {{0}};
+
+/*!
+ * @brief Empty function for time adjustment
+ *
+ * @ingroup pdk_profiling_hooks
+ *
+ * Nothing more than an empty function that is referenced to measure the time
+ * used by the instrumentation functions themselves. This is recorded and
+ * passed into post-processing for a more accurate result.
+ */
+void __attribute__ ((noinline)) empty_fn(void); /*for misra warnings*/
+void __attribute__ ((noinline)) empty_fn(void){
+}
+
+/*!
+ * @brief ARMv7 GCC Utils Entry Hook
+ *
+ * @ingroup pdk_profiling_hooks
+ *
+ * Instruments the entry point, call site and timestamp of the current function
+ * into memory. Note that this is a standard GCC library prototype function and
+ * is automatically referenced at the entry of every function by GCC.
+ *
+ * @param *this_fn Function Assembly Address (Hexadecimal)
+ * @param *call_site Call Site Assembly Address (Hexadecimal)
+ *
+ * TODO: The Hardware Interrupt Disable functions are disabled because there
+ * are still issues with OSAL that need to be resolved. Using these
+ * functions causes memory corruption.
+ */
+void __attribute__((no_instrument_function))__cyg_profile_func_enter(const void *this_fn, const void *call_site){
+ uint32_t val;
+
+ asm volatile("mrs %0, pmccntr_el0" : "=r" (val));
+
+ if (log_idx == 0){
+ uint32_t entry_offset = 0;
+ uint32_t exit_offset = 0;
+ log_idx++;
+ log_idx++;
+ int32_t i;
+ for (i = 0; i < 10; i++){
+ empty_fn();
+ }
+ elemlog[0].isEnter = 2;
+ elemlog[0].this_fn = 1;
+ elemlog[0].call_site = 1;
+ /*Taking 10 sample and subtracting (exit_log - entry log) of present for calculating the entry offset*/
+ for(i=1;i<=10;i++)
+ {
+ entry_offset += (elemlog[(2*i)+1].timestamp - elemlog[(2*i)].timestamp);
+ }
+ /* Saving the average of 10 sample */
+ elemlog[0].timestamp = entry_offset/10U;
+ elemlog[1].isEnter = 2;
+ elemlog[1].this_fn = 1;
+ elemlog[1].call_site = 2;
+ /* Taking 9 sample and subtracting (entry_log of next - exit_log of present) for calculating the exit offset*/
+ for(i=2;i<=10;i++)
+ {
+ exit_offset += (elemlog[(2*i)].timestamp - elemlog[(2*i)-1].timestamp);
+ }
+ /* Saving the average of 9 sample */
+ elemlog[1].timestamp = exit_offset/9U;
+ log_idx = 2U;
+ }
+ if (log_idx < MAX_LOG){
+ elemlog[log_idx].isEnter = 1;
+ elemlog[log_idx].this_fn = (int32_t)this_fn;
+ elemlog[log_idx].call_site = (int32_t)call_site;
+ elemlog[log_idx].timestamp = (int32_t)val;
+ log_idx++;
+ }
+}
+
+/*!
+ * @brief ARMv7 GCC Utils Exit Hook
+ *
+ * @ingroup pdk_profiling_hooks
+ *
+ * Instruments the entry point, call site and timestamp of the current function
+ * into memory. Note that this is a standard GCC library prototype function and
+ * is automatically referenced at the entry of every function by GCC.
+ *
+ * @param *this_fn Function Assembly Address (Hexadecimal)
+ * @param *call_site Call Site Assembly Address (Hexadecimal)
+ *
+ * TODO: The Hardware Interrupt Disable functions are disabled because there
+ * are still issues with OSAL that need to be resolved. Using these
+ * functions causes memory corruption.
+ */
+void __attribute__((no_instrument_function))__cyg_profile_func_exit(const void *this_fn, void *call_site){
+ uint32_t val;
+
+ asm volatile("mrs %0, pmccntr_el0" : "=r" (val));
+
+ if (log_idx < MAX_LOG){
+ elemlog[log_idx].isEnter = 0;
+ elemlog[log_idx].this_fn = (int32_t)this_fn;
+ elemlog[log_idx].timestamp = (int32_t)val;
+ log_idx++;
+ }
+}
+void __attribute__((no_instrument_function))TaskRegisterId(int32_t hookSetId); /*for misra warnings*/
+void __attribute__((no_instrument_function))TaskRegisterId(int32_t hookSetId)
+{
+ CurrentTaskHookSetId = hookSetId;
+ if(MaxTaskHookSetId < CurrentTaskHookSetId)
+ {
+ MaxTaskHookSetId = CurrentTaskHookSetId;
+ }
+}
+
+/* ======== mySwitch ========
+* invoked whenever a Task switch occurs/is made ready to run */
+void __attribute__((no_instrument_function))mySwitch(const void* prev, const void* next); /*for misra warnings*/
+void __attribute__((no_instrument_function))mySwitch(const void* prev, const void* next)
+{
+ uint32_t val;
+
+
+ asm volatile("mrs %0, pmccntr_el0" : "=r" (val));
+
+ if (log_idx < MAX_LOG){
+ elemlog[log_idx].isEnter = 3;
+ elemlog[log_idx].this_fn = (int32_t)next;
+ elemlog[log_idx].call_site = (int32_t)prev;
+ elemlog[log_idx].timestamp = (int32_t)val;
+ log_idx++;
+ }
+}
+
diff --git a/profiling/src/profilingHooksR5.c b/profiling/src/profilingHooksR5.c
--- /dev/null
@@ -0,0 +1,205 @@
+/*
+ * Copyright (c) 2018, Texas Instruments Incorporated
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+/**
+ * @file profilingHooksM4.c
+ *
+ * @brief M4 Implementations of the runtime programming hooks of the Processor SDK Profiling Tool.
+ *
+ * For more information, see:
+ * - @subpage profCCS
+ * - @subpage profDSS
+ *
+ * ## Usage ##
+ *
+ * Applications that are included in a profiling session must set these
+ * compiler flags for the desired platform:
+ * - ARM: `-finstrument-functions -gdwarf-3 -g`
+ * - DSP: `--entry_parm=address --exit_hook=ti_utils_exit --exit_parm=address --entry_hook=ti_utils_entry -g`
+ * - M4: `--entry_parm=address --exit_hook=ti_utils_exit --exit_parm=address --entry_hook=ti_utils_entry -g`
+ *
+ * The `_ENABLE_BM` flag is used to indicate in a class at compiletime whether
+ * or not profiling is being used.
+ *
+ * For best results, ensure that the optimization levels are consistent between
+ * the library and the project (typically -O3, or optimization level 3).
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include "profilingHooks.h"
+#include <ti/csl/arch/r5/csl_arm_r5.h>
+
+int32_t CurrentTaskHookSetId, MaxTaskHookSetId;
+
+/*!
+ * @brief Maximum log count
+ *
+ * This is a predefined value to indicate when the instrumentation hooks should
+ * stop logging data. This is important for applications that have long polling
+ * loops or a device that has a small cache.
+ */
+#define MAX_LOG (1U*1024U*1024U)
+
+uint32_t log_idx = 0;
+uint32_t lvl = 0;
+
+/*!
+ * @brief Utils profiling log structure
+ *
+ * Utils log elements have a predefined structure of four words (to avoid the
+ * need of malloc) and are stored in an array of predefined length, `elemlog`.
+ */
+typedef struct{
+ /*! Indicates either enter or exit */
+ int32_t isEnter;
+ /*! Pointer address of the function in current context */
+ int32_t this_fn;
+ /*! Optional: Pointer address of calling function in current context */
+ int32_t call_site;
+ /*! Timestamp of the entry or exit */
+ uint32_t timestamp;
+}utilsProfilingElem;
+
+utilsProfilingElem elemlog[MAX_LOG] = {{0}};
+
+/*!
+ * @brief Empty function for time adjustment
+ *
+ * @ingroup pdk_profiling_hooks
+ *
+ * Nothing more than an empty function that is referenced to measure the time
+ * used by the instrumentation functions themselves. This is recorded and
+ * passed into post-processing for a more accurate result.
+ */
+#pragma FUNC_CANNOT_INLINE(empty_fn);
+void empty_fn(void); /*for misra warnings*/
+void empty_fn(void){
+}
+
+/*!
+ * @brief TI Toolchain Utils Entry Hook
+ *
+ * @ingroup pdk_profiling_hooks
+ *
+ * Instruments the entry point and timestamp of the current function into
+ * memory. Note that this function is automatically referenced at entry of
+ * every function by TI Toolchain.
+ *
+ * @param *func_addr Function Assembly Address (Hexadecimal)
+ */
+void ti_utils_entry(void (* func_addr)(void)){
+ if (log_idx == 0){
+ uint32_t entry_offset = 0;
+ uint32_t exit_offset = 0;
+ log_idx++;
+ log_idx++;
+ int32_t i;
+ for (i = 0; i < 10; i++){
+ empty_fn();
+ }
+ elemlog[0].isEnter = 2;
+ elemlog[0].this_fn = 3;
+ elemlog[0].call_site = 1;
+ /*Taking 10 sample and subtracting (exit_log - entry log) of present for calculating the entry offset*/
+ for(i=1;i<=10;i++)
+ {
+ entry_offset += (elemlog[(2*i)+1].timestamp - elemlog[(2*i)].timestamp);
+ }
+ /* Saving the average of 10 sample */
+ elemlog[0].timestamp = entry_offset/10U;
+ elemlog[1].isEnter = 2;
+ elemlog[1].this_fn = 3;
+ elemlog[1].call_site = 2;
+ /* Taking 9 sample and subtracting (entry_log of next - exit_log of present) for calculating the exit offset*/
+ for(i=2;i<=10;i++)
+ {
+ exit_offset += (elemlog[(2*i)].timestamp - elemlog[(2*i)-1].timestamp);
+ }
+ /* Saving the average of 9 sample */
+ elemlog[1].timestamp = exit_offset/9U;
+ log_idx = 2U;
+ }
+ if (log_idx < MAX_LOG){
+ elemlog[log_idx].isEnter = 1;
+ elemlog[log_idx].this_fn = (int32_t)func_addr;
+ elemlog[log_idx].timestamp = CSL_armR5PmuReadCntr(CSL_ARM_R5_PMU_CYCLE_COUNTER_NUM);
+ log_idx++;
+ }
+}
+
+/*!
+ * @brief TI Toolchain Utils Exit Hook
+ *
+ * @ingroup pdk_profiling_hooks
+ *
+ * Instruments the exit point and timestamp of the current function into
+ * memory. Note that this function is automatically referenced at end of
+ * every function by TI Toolchain.
+ *
+ * @param *func_addr Function Assembly Address (Hexadecimal)
+ */
+void ti_utils_exit(void (* func_addr)(void)){
+ if (log_idx < MAX_LOG){
+ elemlog[log_idx].isEnter = 0;
+ elemlog[log_idx].this_fn = (int32_t)func_addr;
+ elemlog[log_idx].timestamp = CSL_armR5PmuReadCntr(CSL_ARM_R5_PMU_CYCLE_COUNTER_NUM);
+ log_idx++;
+ }
+}
+
+#pragma NO_HOOKS (TaskRegisterId)
+void TaskRegisterId(int32_t hookSetId); /*for misra warnings*/
+void TaskRegisterId(int32_t hookSetId)
+{
+ CurrentTaskHookSetId = hookSetId;
+ if(MaxTaskHookSetId < CurrentTaskHookSetId)
+ {
+ MaxTaskHookSetId = CurrentTaskHookSetId;
+ }
+}
+
+/* ======== mySwitch ========
+* invoked whenever a Task switch occurs/is made ready to run */
+#pragma NO_HOOKS (mySwitch)
+void mySwitch(const void* prev, const void* next); /*for misra warnings*/
+void mySwitch(const void* prev, const void* next)
+{
+ if (log_idx < MAX_LOG){
+ elemlog[log_idx].isEnter = 3;
+ elemlog[log_idx].this_fn = (int32_t)next;
+ elemlog[log_idx].call_site = (int32_t)prev;
+ elemlog[log_idx].timestamp = CSL_armR5PmuReadCntr(CSL_ARM_R5_PMU_CYCLE_COUNTER_NUM);
+ log_idx++;
+ }
+}