60/2 perf grab #1850
This commit is contained in:
parent
8f1e215ece
commit
e2ca642f97
|
@ -8,6 +8,7 @@
|
||||||
#include "tooth_logger.h"
|
#include "tooth_logger.h"
|
||||||
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
#include "perf_trace.h"
|
||||||
|
|
||||||
#if EFI_TOOTH_LOGGER
|
#if EFI_TOOTH_LOGGER
|
||||||
|
|
||||||
|
@ -97,6 +98,7 @@ static void SetNextCompositeEntry(efitick_t timestamp, bool trigger1, bool trigg
|
||||||
}
|
}
|
||||||
|
|
||||||
void LogTriggerTooth(trigger_event_e tooth, efitick_t timestamp DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
void LogTriggerTooth(trigger_event_e tooth, efitick_t timestamp DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
|
ScopePerf perf(PE::LogTriggerTooth);
|
||||||
// bail if we aren't enabled
|
// bail if we aren't enabled
|
||||||
if (!ToothLoggerEnabled) {
|
if (!ToothLoggerEnabled) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -272,7 +272,7 @@ void hwHandleShaftSignal(trigger_event_e signal, efitick_t timestamp) {
|
||||||
// We want to do this before anything else as we
|
// We want to do this before anything else as we
|
||||||
// actually want to capture any noise/jitter that may be occurring
|
// actually want to capture any noise/jitter that may be occurring
|
||||||
|
|
||||||
bool logLogicState = CONFIG(displayLogicLevelsInEngineSniffer && engineConfiguration->useOnlyRisingEdgeForTrigger);
|
bool logLogicState = CONFIG(displayLogicLevelsInEngineSniffer) && CONFIG(useOnlyRisingEdgeForTrigger);
|
||||||
|
|
||||||
if (!logLogicState) {
|
if (!logLogicState) {
|
||||||
// we log physical state even if displayLogicLevelsInEngineSniffer if both fronts are used by decoder
|
// we log physical state even if displayLogicLevelsInEngineSniffer if both fronts are used by decoder
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
/**
|
/**
|
||||||
* @file perf_trace.cpp
|
* @file perf_trace.cpp
|
||||||
*
|
*
|
||||||
|
* https://github.com/rusefi/rusefi/wiki/Developer-Performance-Tracing
|
||||||
|
*
|
||||||
* See JsonOutput.java in rusEfi console
|
* See JsonOutput.java in rusEfi console
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
// each element in PE more than once, as they should each indicate that a specific thing began,
|
// each element in PE more than once, as they should each indicate that a specific thing began,
|
||||||
// ended, or occurred.
|
// ended, or occurred.
|
||||||
enum class PE : uint8_t {
|
enum class PE : uint8_t {
|
||||||
// The tag below is consumed by PerfTraceTool.java
|
// The tag below is consumed by PerfTraceTool.java which generates EnumNames.java
|
||||||
// enum_start_tag
|
// enum_start_tag
|
||||||
INVALID,
|
INVALID,
|
||||||
ISR,
|
ISR,
|
||||||
|
@ -63,6 +63,7 @@ enum class PE : uint8_t {
|
||||||
GlobalLock,
|
GlobalLock,
|
||||||
GlobalUnlock,
|
GlobalUnlock,
|
||||||
SoftwareKnockProcess,
|
SoftwareKnockProcess,
|
||||||
|
LogTriggerTooth,
|
||||||
// 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
|
||||||
|
|
|
@ -11,3 +11,4 @@ DfuSe
|
||||||
rusefi_*.*
|
rusefi_*.*
|
||||||
triggers
|
triggers
|
||||||
unit_test*.xml
|
unit_test*.xml
|
||||||
|
*trace.json
|
||||||
|
|
|
@ -51,5 +51,6 @@ public class EnumNames {
|
||||||
"GlobalLock",
|
"GlobalLock",
|
||||||
"GlobalUnlock",
|
"GlobalUnlock",
|
||||||
"SoftwareKnockProcess",
|
"SoftwareKnockProcess",
|
||||||
|
"LogTriggerTooth",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ import java.util.List;
|
||||||
* This class helps to write JSON files readable by chrome://tracing/
|
* This class helps to write JSON files readable by chrome://tracing/
|
||||||
* <p>
|
* <p>
|
||||||
* See https://github.com/catapult-project/catapult/blob/master/tracing/README.md
|
* See https://github.com/catapult-project/catapult/blob/master/tracing/README.md
|
||||||
* @see PerfTraceTool
|
* @see PerfTraceTool code generator for EnumNames.java
|
||||||
*/
|
*/
|
||||||
public class JsonOutput {
|
public class JsonOutput {
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ public class BenchTestPane {
|
||||||
List<Entry> data = Entry.parseBuffer(packet);
|
List<Entry> data = Entry.parseBuffer(packet);
|
||||||
|
|
||||||
int rpm = RpmModel.getInstance().getValue();
|
int rpm = RpmModel.getInstance().getValue();
|
||||||
String fileName = Logger.getDate() + "_rpm_" + rpm + "_rusEfi_trace" + ".json";
|
String fileName = Logger.getDate() + "_rpm_" + rpm + "_rusEFI_trace" + ".json";
|
||||||
|
|
||||||
|
|
||||||
JsonOutput.writeToStream(data, new FileOutputStream(fileName));
|
JsonOutput.writeToStream(data, new FileOutputStream(fileName));
|
||||||
|
|
Loading…
Reference in New Issue