making F4 and else happier with perf_trace, also maybe missing 'break'?

This commit is contained in:
rusefi 2019-11-19 20:36:47 -05:00
parent 4d9b0745f1
commit 95e8f4227b
6 changed files with 17 additions and 1 deletions

View File

@ -853,14 +853,19 @@ int tunerStudioHandleCrcCommand(ts_channel_s *tsChannel, char *data, int incomin
break;
case TS_PERF_TRACE_BEGIN:
#if ENABLE_PERF_TRACE
perfTraceEnable();
#endif /* ENABLE_PERF_TRACE */
break;
case TS_PERF_TRACE_GET_BUFFER:
{
#if ENABLE_PERF_TRACE
auto trace = perfTraceGetBuffer();
sr5SendResponse(tsChannel, TS_CRC, trace.Buffer, trace.Size);
#endif /* ENABLE_PERF_TRACE */
}
#endif /* EFI_TOOTH_LOGGER */
break;
default:
tunerStudioError("ERROR: ignoring unexpected command");
return false;

View File

@ -797,7 +797,7 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX)
// help to notice when RAM usage goes up - if a code change adds to RAM usage these variables would fail
// linking process which is the way to raise the alarm
#ifndef RAM_UNUSED_SIZE
#define RAM_UNUSED_SIZE 19000
#define RAM_UNUSED_SIZE 3000
#endif
#ifndef CCM_UNUSED_SIZE
#define CCM_UNUSED_SIZE 4600

View File

@ -4,7 +4,10 @@
#include "efitime.h"
#include "os_util.h"
#ifndef TRACE_BUFFER_LENGTH
#define TRACE_BUFFER_LENGTH 2048
#endif /* TRACE_BUFFER_LENGTH */
enum class EPhase : char
{

View File

@ -85,12 +85,16 @@ public:
ScopePerf(PE event, uint8_t data) : m_event(event), m_data(data)
{
#if ENABLE_PERF_TRACE
perfEventBegin(event, data);
#endif /* ENABLE_PERF_TRACE */
}
~ScopePerf()
{
#if ENABLE_PERF_TRACE
perfEventEnd(m_event, m_data);
#endif /* ENABLE_PERF_TRACE */
}
private:

View File

@ -14,6 +14,8 @@
#define EFI_ENABLE_MOCK_ADC TRUE
#define ENABLE_PERF_TRACE FALSE
#define EFI_PRINTF_FUEL_DETAILS TRUE
#define EFI_ENABLE_CRITICAL_ENGINE_STOP TRUE
#define EFI_ENABLE_ENGINE_WARNING TRUE

View File

@ -14,6 +14,8 @@
#define EFI_CJ125 TRUE
#define ENABLE_PERF_TRACE FALSE
#define EFI_IDLE_CONTROL TRUE
#define EFI_ELECTRONIC_THROTTLE_BODY TRUE