Mark3 Realtime Kernel
profile.h
Go to the documentation of this file.
1 /*===========================================================================
2  _____ _____ _____ _____
3  ___| _|__ __|_ |__ __|__ |__ __| __ |__ ______
4 | \ / | || \ || | || |/ / ||___ |
5 | \/ | || \ || \ || \ ||___ |
6 |__/\__/|__|_||__|\__\ __||__|\__\ __||__|\__\ __||______|
7  |_____| |_____| |_____| |_____|
8 
9 --[Mark3 Realtime Platform]--------------------------------------------------
10 
11 Copyright (c) 2012 - 2019 m0slevin, all rights reserved.
12 See license.txt for more information
13 =========================================================================== */
51 #pragma once
52 
53 #include "kerneltypes.h"
54 #include "mark3cfg.h"
55 #include "ll.h"
56 
57 namespace Mark3
58 {
68 {
69 public:
75  void Init();
76 
82  void Start();
83 
89  void Stop();
90 
97  uint32_t GetAverage();
98 
106  uint32_t GetCurrent();
107 
108 private:
109  uint32_t m_u32StartTicks;
111  uint32_t m_u32Cumulative;
112  uint16_t m_u16Iterations;
113  bool m_bActive;
114 };
115 } // namespace Mark3
Profiling timer. This class is used to perform high-performance profiling of code to see how int32_t ...
Definition: profile.h:67
Basic data type primatives used throughout the OS.
uint32_t GetCurrent()
GetCurrent Return the current tick count held by the profiler. Valid for both active and stopped time...
Definition: profile.cpp:72
Definition: atomic.cpp:23
bool m_bActive
Wheter or not the timer is active or stopped.
Definition: profile.h:113
Mark3 Kernel Configuration This file is used to configure the kernel for your specific application in...
uint32_t m_u32Cumulative
Cumulative ticks tracked.
Definition: profile.h:111
uint32_t GetAverage()
GetAverage Get the average time associated with this operation.
Definition: profile.cpp:63
uint32_t m_u32CurrentIteration
Tick count for current iteration.
Definition: profile.h:110
uint16_t m_u16Iterations
Number of iterations executed for this profiling timer.
Definition: profile.h:112
void Start()
Start Start a profiling session, if the timer is not already active. Has no effect if the timer is al...
Definition: profile.cpp:34
void Stop()
Stop Stop the current profiling session, adding to the cumulative time for this timer, and the total iteration count.
Definition: profile.cpp:46
uint32_t m_u32StartTicks
Cumulative tick-count for this timer.
Definition: profile.h:109
Core linked-list declarations, used by all kernel list types At the heart of RTOS data structures are...
void Init()
Init Initialize the profiling timer prior to use. Can also be used to reset a timer that's been used ...
Definition: profile.cpp:25