diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-07-29 15:13:52 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-07-29 15:13:52 +0000 |
commit | f569bcec23452c190248aab184a125f3a52e2eb8 (patch) | |
tree | ee7b4be89b879597c2d82a49616d963696fbf78c /os/kernel/include/chstats.h | |
parent | ca4b2f91b7a24abeb6ea7fa43c1816397fb966c4 (diff) | |
download | ChibiOS-f569bcec23452c190248aab184a125f3a52e2eb8.tar.gz ChibiOS-f569bcec23452c190248aab184a125f3a52e2eb8.tar.bz2 ChibiOS-f569bcec23452c190248aab184a125f3a52e2eb8.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6040 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/include/chstats.h')
-rw-r--r-- | os/kernel/include/chstats.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/os/kernel/include/chstats.h b/os/kernel/include/chstats.h index dee5c9bec..d2a83e1b6 100644 --- a/os/kernel/include/chstats.h +++ b/os/kernel/include/chstats.h @@ -55,12 +55,15 @@ * @brief Type of a kernel statistics structure.
*/
typedef struct {
- ucnt_t nirq; /**< @brief IRQ number.
- @note Fast Interrupts are not
- accounted for. */
- ucnt_t nctxswc; /**< @brief Context switch number. */
- time_measurement_t critical; /**< @brief Critical zones measurement. */
- time_measurement_t isr; /**< @brief ISR measurement. */
+ time_measurement_t *current; /**< @brief Currently under measurement.*/
+ ucnt_t n_irq; /**< @brief Number of IRQs. */
+ ucnt_t n_ctxswc; /**< @brief Number of context switches. */
+ time_measurement_t m_crit_thd; /**< @brief Measurement of threads
+ critical zones duration. */
+ time_measurement_t m_crit_isr; /**< @brief Measurement of ISRs critical
+ zones duration. */
+ time_measurement_t m_isr; /**< @brief Measurement of ISRs total
+ duration. */
} kernel_stats_t;
/*===========================================================================*/
@@ -70,12 +73,12 @@ typedef struct { /**
* @brief Increases the IRQ counter.
*/
-#define _stats_increase_irq() kernel_stats.nirq++
+#define _stats_increase_irq() kernel_stats.n_irq++
/**
* @brief Increases the context switch counter.
*/
-#define _stats_increase_ctxswc() kernel_stats.nctxswc++
+#define _stats_increase_ctxswc() kernel_stats.n_ctxswc++
/*===========================================================================*/
/* External declarations. */
|