removing legacy perf code
This commit is contained in:
parent
0a7ec2cf59
commit
537a95a9b4
|
@ -40,15 +40,13 @@
|
|||
#include "advance_map.h"
|
||||
#include "allsensors.h"
|
||||
#include "cyclic_buffer.h"
|
||||
#include "histogram.h"
|
||||
#include "fuel_math.h"
|
||||
#include "histogram.h"
|
||||
#include "cdm_ion_sense.h"
|
||||
#include "engine_controller.h"
|
||||
#include "efi_gpio.h"
|
||||
#if EFI_PROD_CODE
|
||||
#include "os_util.h"
|
||||
#endif /* EFI_HISTOGRAMS */
|
||||
#endif /* EFI_PROD_CODE */
|
||||
#include "local_version_holder.h"
|
||||
#include "event_queue.h"
|
||||
#include "engine.h"
|
||||
|
@ -406,16 +404,6 @@ static ALWAYS_INLINE void handleFuel(const bool limitedFuel, uint32_t trgEventIn
|
|||
}
|
||||
}
|
||||
|
||||
#if EFI_HISTOGRAMS
|
||||
static histogram_s mainLoopHistogram;
|
||||
#endif /* EFI_HISTOGRAMS */
|
||||
|
||||
void showMainHistogram(void) {
|
||||
#if EFI_HISTOGRAMS
|
||||
printHistogram(logger, &mainLoopHistogram);
|
||||
#endif /* EFI_HISTOGRAMS */
|
||||
}
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
/**
|
||||
* this field is used as an Expression in IAR debugger
|
||||
|
@ -484,10 +472,6 @@ void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t trgEventIndex D
|
|||
warning(CUSTOM_SKIPPING_STROKE, "skipping stroke due to rpm=%d", rpm);
|
||||
}
|
||||
|
||||
#if EFI_HISTOGRAMS && EFI_PROD_CODE
|
||||
int beforeCallback = hal_lld_get_counter_value();
|
||||
#endif
|
||||
|
||||
if (trgEventIndex == 0) {
|
||||
if (HAVE_CAM_INPUT()) {
|
||||
engine->triggerCentral.validateCamVvtCounters();
|
||||
|
@ -527,11 +511,6 @@ void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t trgEventIndex D
|
|||
* For spark we schedule both start of coil charge and actual spark based on trigger angle
|
||||
*/
|
||||
onTriggerEventSparkLogic(limitedSpark, trgEventIndex, rpm PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
#if EFI_HISTOGRAMS
|
||||
int diff = hal_lld_get_counter_value() - beforeCallback;
|
||||
if (diff > 0)
|
||||
hsAdd(&mainLoopHistogram, diff);
|
||||
#endif /* EFI_HISTOGRAMS */
|
||||
|
||||
if (trgEventIndex == 0) {
|
||||
ENGINE(m.mainTriggerCallbackTime) = getTimeNowLowerNt() - ENGINE(m.beforeMainTrigger);
|
||||
|
@ -609,18 +588,13 @@ void updatePrimeInjectionPulseState(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
#include "engine_sniffer.h"
|
||||
#endif
|
||||
|
||||
static void showTriggerHistogram(void) {
|
||||
printAllCallbacksHistogram();
|
||||
showMainHistogram();
|
||||
}
|
||||
|
||||
static void showMainInfo(Engine *engine) {
|
||||
#if EFI_PROD_CODE
|
||||
int rpm = GET_RPM();
|
||||
float el = getEngineLoadT(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
scheduleMsg(logger, "rpm %d engine_load %.2f", rpm, el);
|
||||
scheduleMsg(logger, "fuel %.2fms timing %.2f", getInjectionDuration(rpm PASS_ENGINE_PARAMETER_SUFFIX), engine->engineState.timingAdvance);
|
||||
#endif
|
||||
#endif /* EFI_PROD_CODE */
|
||||
}
|
||||
|
||||
void initMainEventListener(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
|
@ -631,7 +605,6 @@ void initMainEventListener(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX
|
|||
initAuxValves(logger PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
addConsoleAction("performanceinfo", showTriggerHistogram);
|
||||
addConsoleActionP("maininfo", (VoidPtr) showMainInfo, engine);
|
||||
|
||||
printMsg(logger, "initMainLoop: %d", currentTimeMillis());
|
||||
|
@ -639,10 +612,6 @@ void initMainEventListener(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX
|
|||
printMsg(logger, "!!!!!!!!!!!!!!!!!!! injection disabled");
|
||||
#endif
|
||||
|
||||
#if EFI_HISTOGRAMS
|
||||
initHistogram(&mainLoopHistogram, "main callback");
|
||||
#endif /* EFI_HISTOGRAMS */
|
||||
|
||||
addTriggerEventListener(mainTriggerCallback, "main loop", engine);
|
||||
|
||||
// We start prime injection pulse at the early init stage - don't wait for the engine to start spinning!
|
||||
|
|
|
@ -19,8 +19,6 @@ void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex DECL
|
|||
int isIgnitionTimingError(void);
|
||||
void startPrimeInjectionPulse(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
void showMainHistogram(void);
|
||||
|
||||
void startSimultaniousInjection(Engine *engine);
|
||||
void endSimultaniousInjection(InjectionEvent *event);
|
||||
void seTurnPinHigh(InjectionEvent *event);
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "engine_configuration.h"
|
||||
#include "listener_array.h"
|
||||
#include "data_buffer.h"
|
||||
#include "histogram.h"
|
||||
#include "pwm_generator_logic.h"
|
||||
#include "tooth_logger.h"
|
||||
|
||||
|
@ -68,10 +67,6 @@ int TriggerCentral::getHwEventCounter(int index) const {
|
|||
|
||||
EXTERN_ENGINE;
|
||||
|
||||
#if EFI_HISTOGRAMS
|
||||
static histogram_s triggerCallbackHistogram;
|
||||
#endif /* EFI_HISTOGRAMS */
|
||||
|
||||
static Logging *logger;
|
||||
|
||||
void TriggerCentral::addEventListener(ShaftPositionListener listener, const char *name, Engine *engine) {
|
||||
|
@ -345,9 +340,6 @@ void TriggerCentral::handleShaftSignal(trigger_event_e signal DECLARE_ENGINE_PAR
|
|||
|
||||
engine->onTriggerSignalEvent(nowNt);
|
||||
|
||||
#if EFI_HISTOGRAMS && EFI_PROD_CODE
|
||||
int beforeCallback = hal_lld_get_counter_value();
|
||||
#endif
|
||||
int eventIndex = (int) signal;
|
||||
efiAssertVoid(CUSTOM_ERR_6638, eventIndex >= 0 && eventIndex < HW_EVENT_TYPES, "signal type");
|
||||
hwEventCounters[eventIndex]++;
|
||||
|
@ -409,20 +401,6 @@ void TriggerCentral::handleShaftSignal(trigger_event_e signal DECLARE_ENGINE_PAR
|
|||
}
|
||||
|
||||
}
|
||||
#if EFI_HISTOGRAMS
|
||||
int afterCallback = hal_lld_get_counter_value();
|
||||
int diff = afterCallback - beforeCallback;
|
||||
// this counter is only 32 bits so it overflows every minute, let's ignore the value in case of the overflow for simplicity
|
||||
if (diff > 0) {
|
||||
hsAdd(&triggerCallbackHistogram, diff);
|
||||
}
|
||||
#endif /* EFI_HISTOGRAMS */
|
||||
}
|
||||
|
||||
void printAllCallbacksHistogram(void) {
|
||||
#if EFI_HISTOGRAMS
|
||||
printHistogram(logger, &triggerCallbackHistogram);
|
||||
#endif
|
||||
}
|
||||
|
||||
EXTERN_ENGINE
|
||||
|
@ -738,9 +716,6 @@ void initTriggerCentral(Logging *sharedLogger) {
|
|||
addConsoleAction("reset_trigger", resetRunningTriggerCounters);
|
||||
#endif
|
||||
|
||||
#if EFI_HISTOGRAMS
|
||||
initHistogram(&triggerCallbackHistogram, "all callbacks");
|
||||
#endif /* EFI_HISTOGRAMS */
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -2,11 +2,10 @@
|
|||
* @file trigger_central.h
|
||||
*
|
||||
* @date Feb 23, 2014
|
||||
* @author Andrey Belomutskiy, (c) 2012-2017
|
||||
* @author Andrey Belomutskiy, (c) 2012-2019
|
||||
*/
|
||||
|
||||
#ifndef TRIGGER_CENTRAL_H_
|
||||
#define TRIGGER_CENTRAL_H_
|
||||
#pragma once
|
||||
|
||||
#include "rusefi_enums.h"
|
||||
#include "listener_array.h"
|
||||
|
@ -61,7 +60,6 @@ void hwHandleShaftSignal(trigger_event_e signal);
|
|||
void hwHandleVvtCamSignal(trigger_value_e front DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
|
||||
void initTriggerCentral(Logging *sharedLogger);
|
||||
void printAllCallbacksHistogram(void);
|
||||
void printAllTriggers();
|
||||
|
||||
void addTriggerEventListener(ShaftPositionListener handler, const char *name, Engine *engine);
|
||||
|
@ -72,4 +70,3 @@ void onConfigurationChangeTriggerCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
|||
bool checkIfTriggerConfigChanged(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
bool isTriggerConfigChanged(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
#endif /* TRIGGER_CENTRAL_H_ */
|
||||
|
|
Loading…
Reference in New Issue