replacing probably unused engineSnifferHisto with new perf_trace

This commit is contained in:
rusefi 2019-12-23 20:22:17 -05:00
parent 65f5991b9e
commit 84e732846b
4 changed files with 5 additions and 27 deletions

View File

@ -5,7 +5,7 @@
* See http://rusefi.com/docs/html/
*
* @date Feb 7, 2013
* @author Andrey Belomutskiy, (c) 2012-2018
* @author Andrey Belomutskiy, (c) 2012-2019
*
* This file is part of rusEfi - see http://rusefi.com
*
@ -612,9 +612,6 @@ void updatePrimeInjectionPulseState(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
static void showTriggerHistogram(void) {
printAllCallbacksHistogram();
showMainHistogram();
#if EFI_ENGINE_SNIFFER
showWaveChartHistogram();
#endif
}
static void showMainInfo(Engine *engine) {

View File

@ -34,15 +34,10 @@
#include "engine_configuration.h"
#include "eficonsole.h"
#include "status_loop.h"
#include "perf_trace.h"
#define CHART_DELIMETER '!'
#if EFI_HISTOGRAMS
#include "os_util.h"
#include "histogram.h"
static histogram_s engineSnifferHisto;
#endif /* EFI_HISTOGRAMS */
EXTERN_ENGINE
;
extern uint32_t maxLockedDuration;
@ -165,6 +160,8 @@ void WaveChart::publish() {
* @brief Register an event for digital sniffer
*/
void WaveChart::addEvent3(const char *name, const char * msg) {
ScopePerf perf(PE::EngineSniffer);
if (getTimeNowNt() < pauseEngineSnifferUntilNt) {
return;
}
@ -195,9 +192,6 @@ void WaveChart::addEvent3(const char *name, const char * msg) {
return;
}
#if EFI_HISTOGRAMS && EFI_PROD_CODE
int beforeCallback = hal_lld_get_counter_value();
#endif
efitick_t nowNt = getTimeNowNt();
@ -238,22 +232,9 @@ void WaveChart::addEvent3(const char *name, const char * msg) {
if (!alreadyLocked) {
unlockOutputBuffer();
}
#if EFI_HISTOGRAMS && EFI_PROD_CODE
int64_t diff = hal_lld_get_counter_value() - beforeCallback;
if (diff > 0) {
hsAdd(&engineSnifferHisto, diff);
}
#endif /* EFI_HISTOGRAMS */
#endif /* EFI_TEXT_LOGGING */
}
void showWaveChartHistogram(void) {
#if EFI_HISTOGRAMS && EFI_PROD_CODE
printHistogram(&logger, &engineSnifferHisto);
#endif
}
void initWaveChart(WaveChart *chart) {
/**
* constructor does not work because we need specific initialization order

View File

@ -44,7 +44,6 @@ private:
};
void initWaveChart(WaveChart *chart);
void showWaveChartHistogram(void);
void setChartSize(int newSize);
#endif /* EFI_ENGINE_SNIFFER */

View File

@ -57,6 +57,7 @@ enum class PE : uint8_t {
Temporary2,
Temporary3,
Temporary4,
EngineSniffer,
// enum_end_tag
// The tag above is consumed by PerfTraceTool.java
// please note that the tool requires a comma at the end of last value