replacing probably unused engineSnifferHisto with new perf_trace
This commit is contained in:
parent
65f5991b9e
commit
84e732846b
|
@ -5,7 +5,7 @@
|
||||||
* See http://rusefi.com/docs/html/
|
* See http://rusefi.com/docs/html/
|
||||||
*
|
*
|
||||||
* @date Feb 7, 2013
|
* @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
|
* This file is part of rusEfi - see http://rusefi.com
|
||||||
*
|
*
|
||||||
|
@ -612,9 +612,6 @@ void updatePrimeInjectionPulseState(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
static void showTriggerHistogram(void) {
|
static void showTriggerHistogram(void) {
|
||||||
printAllCallbacksHistogram();
|
printAllCallbacksHistogram();
|
||||||
showMainHistogram();
|
showMainHistogram();
|
||||||
#if EFI_ENGINE_SNIFFER
|
|
||||||
showWaveChartHistogram();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void showMainInfo(Engine *engine) {
|
static void showMainInfo(Engine *engine) {
|
||||||
|
|
|
@ -34,15 +34,10 @@
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
#include "eficonsole.h"
|
#include "eficonsole.h"
|
||||||
#include "status_loop.h"
|
#include "status_loop.h"
|
||||||
|
#include "perf_trace.h"
|
||||||
|
|
||||||
#define CHART_DELIMETER '!'
|
#define CHART_DELIMETER '!'
|
||||||
|
|
||||||
#if EFI_HISTOGRAMS
|
|
||||||
#include "os_util.h"
|
|
||||||
#include "histogram.h"
|
|
||||||
static histogram_s engineSnifferHisto;
|
|
||||||
#endif /* EFI_HISTOGRAMS */
|
|
||||||
|
|
||||||
EXTERN_ENGINE
|
EXTERN_ENGINE
|
||||||
;
|
;
|
||||||
extern uint32_t maxLockedDuration;
|
extern uint32_t maxLockedDuration;
|
||||||
|
@ -165,6 +160,8 @@ void WaveChart::publish() {
|
||||||
* @brief Register an event for digital sniffer
|
* @brief Register an event for digital sniffer
|
||||||
*/
|
*/
|
||||||
void WaveChart::addEvent3(const char *name, const char * msg) {
|
void WaveChart::addEvent3(const char *name, const char * msg) {
|
||||||
|
ScopePerf perf(PE::EngineSniffer);
|
||||||
|
|
||||||
if (getTimeNowNt() < pauseEngineSnifferUntilNt) {
|
if (getTimeNowNt() < pauseEngineSnifferUntilNt) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -195,9 +192,6 @@ void WaveChart::addEvent3(const char *name, const char * msg) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if EFI_HISTOGRAMS && EFI_PROD_CODE
|
|
||||||
int beforeCallback = hal_lld_get_counter_value();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
efitick_t nowNt = getTimeNowNt();
|
efitick_t nowNt = getTimeNowNt();
|
||||||
|
|
||||||
|
@ -238,22 +232,9 @@ void WaveChart::addEvent3(const char *name, const char * msg) {
|
||||||
if (!alreadyLocked) {
|
if (!alreadyLocked) {
|
||||||
unlockOutputBuffer();
|
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 */
|
#endif /* EFI_TEXT_LOGGING */
|
||||||
}
|
}
|
||||||
|
|
||||||
void showWaveChartHistogram(void) {
|
|
||||||
#if EFI_HISTOGRAMS && EFI_PROD_CODE
|
|
||||||
printHistogram(&logger, &engineSnifferHisto);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void initWaveChart(WaveChart *chart) {
|
void initWaveChart(WaveChart *chart) {
|
||||||
/**
|
/**
|
||||||
* constructor does not work because we need specific initialization order
|
* constructor does not work because we need specific initialization order
|
||||||
|
|
|
@ -44,7 +44,6 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
void initWaveChart(WaveChart *chart);
|
void initWaveChart(WaveChart *chart);
|
||||||
void showWaveChartHistogram(void);
|
|
||||||
void setChartSize(int newSize);
|
void setChartSize(int newSize);
|
||||||
|
|
||||||
#endif /* EFI_ENGINE_SNIFFER */
|
#endif /* EFI_ENGINE_SNIFFER */
|
||||||
|
|
|
@ -57,6 +57,7 @@ enum class PE : uint8_t {
|
||||||
Temporary2,
|
Temporary2,
|
||||||
Temporary3,
|
Temporary3,
|
||||||
Temporary4,
|
Temporary4,
|
||||||
|
EngineSniffer,
|
||||||
// enum_end_tag
|
// enum_end_tag
|
||||||
// The tag above is consumed by PerfTraceTool.java
|
// The tag above is consumed by PerfTraceTool.java
|
||||||
// please note that the tool requires a comma at the end of last value
|
// please note that the tool requires a comma at the end of last value
|
||||||
|
|
Loading…
Reference in New Issue