rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Data Structures | Enumerations | Functions
perf_trace.h File Reference

Detailed Description

https://github.com/rusefi/rusefi/wiki/Developer-Performance-Tracing

Definition in file perf_trace.h.

Data Structures

struct  ScopePerf
 

Enumerations

enum class  PE : uint8_t {
  INVALID , ISR , ContextSwitch , OutputPinSetValue ,
  DecodeTriggerEvent , EnginePeriodicFastCallback , EnginePeriodicSlowCallback , EngineStatePeriodicFastCallback ,
  HandleShaftSignal , EventQueueInsertTask , EventQueueExecuteAll , SingleTimerExecutorDoExecute ,
  SingleTimerExecutorScheduleTimerCallback , PeriodicControllerPeriodicTask , PeriodicTimerControllerPeriodicTask , AdcCallbackFast ,
  AdcProcessSlow , AdcConversionSlow , AdcConversionFast , AdcSubscriptionUpdateSubscribers ,
  GetRunningFuel , GetInjectionDuration , HandleFuel , MainTriggerCallback ,
  OnTriggerEventSparkLogic , ShaftPositionListeners , GetBaseFuel , GetTpsEnrichment ,
  GetSpeedDensityFuel , WallFuelAdjust , MapAveragingTriggerCallback , MainLoop ,
  SingleTimerExecutorScheduleByTimestamp , GetTimeNowUs , EventQueueExecuteCallback , PwmGeneratorCallback ,
  TunerStudioHandleCrcCommand , Unused , PwmConfigStateChangeCallback , Temporary1 ,
  Temporary2 , Temporary3 , Temporary4 , EngineSniffer ,
  PrepareIgnitionSchedule , Hip9011IntHoldCallback , GlobalLock , GlobalUnlock ,
  SoftwareKnockProcess , KnockAnalyzer , LogTriggerTooth , LuaTickFunction ,
  LuaOneCanRxFunction , LuaAllCanRxFunction , LuaOneCanRxCallback , LuaOneCanTxFunction ,
  CanThreadTx , CanThreadRx , CanDriverTx , Temporary5 ,
  Temporary6 , Temporary7 , Temporary8 , Temporary9 ,
  Temporary10 , Temporary11 , Temporary12 , Temporary13 ,
  Temporary14 , Temporary15 , Temporary16
}
 

Functions

void perfEventBegin (PE event)
 
void perfEventEnd (PE event)
 
void perfEventInstantGlobal (PE event)
 
void perfTraceEnable ()
 
const BigBufferHandle perfTraceGetBuffer ()
 

Enumeration Type Documentation

◆ PE

enum class PE : uint8_t
strong
Enumerator
INVALID 
ISR 
ContextSwitch 
OutputPinSetValue 
DecodeTriggerEvent 
EnginePeriodicFastCallback 
EnginePeriodicSlowCallback 
EngineStatePeriodicFastCallback 
HandleShaftSignal 
EventQueueInsertTask 
EventQueueExecuteAll 
SingleTimerExecutorDoExecute 
SingleTimerExecutorScheduleTimerCallback 
PeriodicControllerPeriodicTask 
PeriodicTimerControllerPeriodicTask 
AdcCallbackFast 
AdcProcessSlow 
AdcConversionSlow 
AdcConversionFast 
AdcSubscriptionUpdateSubscribers 
GetRunningFuel 
GetInjectionDuration 
HandleFuel 
MainTriggerCallback 
OnTriggerEventSparkLogic 
ShaftPositionListeners 
GetBaseFuel 
GetTpsEnrichment 
GetSpeedDensityFuel 
WallFuelAdjust 
MapAveragingTriggerCallback 
MainLoop 
SingleTimerExecutorScheduleByTimestamp 
GetTimeNowUs 
EventQueueExecuteCallback 
PwmGeneratorCallback 
TunerStudioHandleCrcCommand 
Unused 
PwmConfigStateChangeCallback 
Temporary1 
Temporary2 
Temporary3 
Temporary4 
EngineSniffer 
PrepareIgnitionSchedule 
Hip9011IntHoldCallback 
GlobalLock 
GlobalUnlock 
SoftwareKnockProcess 
KnockAnalyzer 
LogTriggerTooth 
LuaTickFunction 
LuaOneCanRxFunction 
LuaAllCanRxFunction 
LuaOneCanRxCallback 
LuaOneCanTxFunction 
CanThreadTx 
CanThreadRx 
CanDriverTx 
Temporary5 
Temporary6 
Temporary7 
Temporary8 
Temporary9 
Temporary10 
Temporary11 
Temporary12 
Temporary13 
Temporary14 
Temporary15 
Temporary16 

Definition at line 18 of file perf_trace.h.

18 : uint8_t {
19 // The tag below is consumed by PerfTraceTool.java which generates EnumNames.java
20 // enum_start_tag
21 INVALID,
22 ISR,
35 PeriodicTimerControllerPeriodicTask, //TODO: main_loop remove this after migrating to main_loop
58 Unused,
92 // enum_end_tag
93 // The tag above is consumed by PerfTraceTool.java
94 // please note that the tool requires a comma at the end of last value
95};
@ GetInjectionDuration
@ CanThreadRx
@ OnTriggerEventSparkLogic
@ Temporary16
@ Temporary4
@ HandleShaftSignal
@ Temporary11
@ ContextSwitch
@ Temporary15
@ Temporary10
@ EnginePeriodicSlowCallback
@ Temporary2
@ LuaOneCanTxFunction
@ PwmGeneratorCallback
@ EventQueueExecuteAll
@ PrepareIgnitionSchedule
@ GetBaseFuel
@ ShaftPositionListeners
@ Temporary9
@ AdcConversionFast
@ Temporary6
@ SingleTimerExecutorDoExecute
@ OutputPinSetValue
@ SingleTimerExecutorScheduleByTimestamp
@ KnockAnalyzer
@ SingleTimerExecutorScheduleTimerCallback
@ EventQueueInsertTask
@ PwmConfigStateChangeCallback
@ LuaOneCanRxCallback
@ GetTimeNowUs
@ MapAveragingTriggerCallback
@ TunerStudioHandleCrcCommand
@ LuaTickFunction
@ MainTriggerCallback
@ Temporary12
@ LuaAllCanRxFunction
@ Temporary13
@ LogTriggerTooth
@ EngineSniffer
@ DecodeTriggerEvent
@ Temporary1
@ EnginePeriodicFastCallback
@ Unused
@ Temporary14
@ Temporary8
@ LuaOneCanRxFunction
@ Temporary3
@ AdcConversionSlow
@ CanThreadTx
@ SoftwareKnockProcess
@ EngineStatePeriodicFastCallback
@ GetSpeedDensityFuel
@ AdcProcessSlow
@ AdcSubscriptionUpdateSubscribers
@ WallFuelAdjust
@ HandleFuel
@ Hip9011IntHoldCallback
@ MainLoop
@ EventQueueExecuteCallback
@ GetRunningFuel
@ PeriodicControllerPeriodicTask
@ ISR
@ INVALID
@ GetTpsEnrichment
@ Temporary7
@ GlobalUnlock
@ GlobalLock
@ PeriodicTimerControllerPeriodicTask
@ Temporary5
@ CanDriverTx
@ AdcCallbackFast

Function Documentation

◆ perfEventBegin()

void perfEventBegin ( PE  event)

Definition at line 107 of file perf_trace.cpp.

107 {
109}
static void perfEventImpl(PE event, EPhase phase)

Referenced by irqEnterHook(), and ScopePerf::ScopePerf().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ perfEventEnd()

void perfEventEnd ( PE  event)

Definition at line 111 of file perf_trace.cpp.

111 {
113}

Referenced by irqExitHook(), and ScopePerf::~ScopePerf().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ perfEventInstantGlobal()

void perfEventInstantGlobal ( PE  event)

Definition at line 115 of file perf_trace.cpp.

115 {
117}
@ InstantGlobal

Referenced by contextSwitchHook(), onLockHook(), and onUnlockHook().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ perfTraceEnable()

void perfTraceEnable ( )

Definition at line 119 of file perf_trace.cpp.

119 {
120#if EFI_TOOTH_LOGGER
121 // force release of the buffer if occupied by the tooth logger
122 if (IsToothLoggerEnabled()) {
123 // don't worry, it will be automatically enabled
124 // when the next TS_GET_COMPOSITE_BUFFER_DONE_DIFFERENTLY command arrives
126 }
127#endif // EFI_TOOTH_LOGGER
129 s_isTracing = true;
130}
BigBufferHandle getBigBuffer(BigBufferUser user)
static bool s_isTracing
static BigBufferHandle s_traceBuffer
void DisableToothLogger()
bool IsToothLoggerEnabled()

Referenced by TunerStudio::handleCrcCommand().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ perfTraceGetBuffer()

const BigBufferHandle perfTraceGetBuffer ( )

Definition at line 132 of file perf_trace.cpp.

132 {
133 // stop tracing if you try to get the buffer early
134 stopTrace();
135
136 // transfer ownership of the buffer to the caller
137 return efi::move(s_traceBuffer);
138}
constexpr remove_reference_t< _Ty > && move(_Ty &&_Arg) noexcept
Definition efilib.h:126
static void stopTrace()

Referenced by TunerStudio::handleCrcCommand().

Here is the call graph for this function:
Here is the caller graph for this function:

Go to the source code of this file.