rusEFI
The most advanced open source ECU
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 , Unused1 ,
  SingleTimerExecutorScheduleByTimestamp , GetTimeNowUs , EventQueueExecuteCallback , PwmGeneratorCallback ,
  TunerStudioHandleCrcCommand , Unused , PwmConfigStateChangeCallback , Temporary1 ,
  Temporary2 , Temporary3 , Temporary4 , EngineSniffer ,
  PrepareIgnitionSchedule , Hip9011IntHoldCallback , GlobalLock , GlobalUnlock ,
  SoftwareKnockProcess , LogTriggerTooth , LuaTickFunction , LuaOneCanRxFunction ,
  LuaAllCanRxFunction , LuaOneCanRxCallback , LuaOneCanTxFunction
}
 

Functions

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

Enumeration Type Documentation

◆ PE

enum 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 
Unused1 
SingleTimerExecutorScheduleByTimestamp 
GetTimeNowUs 
EventQueueExecuteCallback 
PwmGeneratorCallback 
TunerStudioHandleCrcCommand 
Unused 
PwmConfigStateChangeCallback 
Temporary1 
Temporary2 
Temporary3 
Temporary4 
EngineSniffer 
PrepareIgnitionSchedule 
Hip9011IntHoldCallback 
GlobalLock 
GlobalUnlock 
SoftwareKnockProcess 
LogTriggerTooth 
LuaTickFunction 
LuaOneCanRxFunction 
LuaAllCanRxFunction 
LuaOneCanRxCallback 
LuaOneCanTxFunction 

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,
43  HandleFuel,
52  Unused1,
58  Unused,
60  Temporary1,
61  Temporary2,
62  Temporary3,
63  Temporary4,
67  GlobalLock,
76  // enum_end_tag
77  // The tag above is consumed by PerfTraceTool.java
78  // please note that the tool requires a comma at the end of last value
79 };
@ GetInjectionDuration
@ OnTriggerEventSparkLogic
@ Temporary4
@ HandleShaftSignal
@ ContextSwitch
@ EnginePeriodicSlowCallback
@ Temporary2
@ LuaOneCanTxFunction
@ PwmGeneratorCallback
@ EventQueueExecuteAll
@ PrepareIgnitionSchedule
@ GetBaseFuel
@ ShaftPositionListeners
@ AdcConversionFast
@ SingleTimerExecutorDoExecute
@ OutputPinSetValue
@ SingleTimerExecutorScheduleByTimestamp
@ SingleTimerExecutorScheduleTimerCallback
@ EventQueueInsertTask
@ PwmConfigStateChangeCallback
@ LuaOneCanRxCallback
@ GetTimeNowUs
@ MapAveragingTriggerCallback
@ TunerStudioHandleCrcCommand
@ LuaTickFunction
@ MainTriggerCallback
@ LuaAllCanRxFunction
@ EngineSniffer
@ DecodeTriggerEvent
@ Temporary1
@ EnginePeriodicFastCallback
@ Unused
@ LuaOneCanRxFunction
@ Temporary3
@ AdcConversionSlow
@ SoftwareKnockProcess
@ EngineStatePeriodicFastCallback
@ GetSpeedDensityFuel
@ AdcProcessSlow
@ AdcSubscriptionUpdateSubscribers
@ WallFuelAdjust
@ HandleFuel
@ Hip9011IntHoldCallback
@ EventQueueExecuteCallback
@ GetRunningFuel
@ PeriodicControllerPeriodicTask
@ ISR
@ INVALID
@ GetTpsEnrichment
@ GlobalUnlock
@ GlobalLock
@ PeriodicTimerControllerPeriodicTask
@ Unused1
@ AdcCallbackFast
void LogTriggerTooth(trigger_event_e tooth, efitick_t timestamp)

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)
Definition: perf_trace.cpp:48

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  {
112  perfEventImpl(event, EPhase::End);
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)
Definition: big_buffer.cpp:61
static bool s_isTracing
Definition: perf_trace.cpp:41
static BigBufferHandle s_traceBuffer
Definition: perf_trace.cpp:38
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:127
static void stopTrace()
Definition: perf_trace.cpp:43

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.