-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement the tracing macros using a backend for esp32. (#29543)
* Implement the tracing macros using a backend for esp32. - This PR is aimed at addressing the review comments on PR #29318. - This is a draft implementation of the backend. * Move esp32 tracing configs around: better location, integrate in build examples, carry over configurations * More options removals * Remove fixme text * Restrict tracing to light app, fix include paths in main, add ignore for authkey since that should not be checked in * Move dependencies around even more - esp32 now seems to compile with tracing enabled * Ensure tracing is actually enabled when insights is on * Restyle * Made esp32_trace backend in sync with existing version * Made the common include on the tracing config for all esp32 examples * Fixed the CI failure --------- Co-authored-by: Andrei Litvin <[email protected]>
- Loading branch information
Showing
15 changed files
with
159 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/build/ | ||
/sdkconfig | ||
/sdkconfig.old | ||
main/insights_auth_key.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include <tracing/backend.h> | ||
|
||
#include <memory> | ||
|
||
namespace chip { | ||
namespace Tracing { | ||
namespace Insights { | ||
|
||
/// A Backend that outputs data to chip logging. | ||
/// | ||
/// Structured data is formatted as json strings. | ||
class ESP32Backend : public ::chip::Tracing::Backend | ||
{ | ||
public: | ||
ESP32Backend() = default; | ||
|
||
void TraceBegin(const char * label, const char * group) override; | ||
|
||
void TraceEnd(const char * label, const char * group) override; | ||
|
||
/// Trace a zero-sized event | ||
void TraceInstant(const char * label, const char * group) override; | ||
|
||
void LogMessageSend(MessageSendInfo &) override; | ||
void LogMessageReceived(MessageReceivedInfo &) override; | ||
|
||
void LogNodeLookup(NodeLookupInfo &) override; | ||
void LogNodeDiscovered(NodeDiscoveredInfo &) override; | ||
void LogNodeDiscoveryFailed(NodeDiscoveryFailedInfo &) override; | ||
}; | ||
|
||
} // namespace Insights | ||
} // namespace Tracing | ||
} // namespace chip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.