File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,29 @@ if (result.buf != nullptr && result.size > 0) {
3939target_compile_options(executorch INTERFACE -DET_EVENT_TRACER_ENABLED)
4040target_compile_options(portable_ops_lib INTERFACE -DET_EVENT_TRACER_ENABLED)
4141```
42+
43+ ### Make sure ET_EVENT_TRACER_ENABLED flag is enabled or ETDump will be empty.
44+
45+ If the binary is not compiled with the ` ET_EVENT_TRACER_ENABLED ` preprocessor flag, no trace events will be recorded and the ETDump will be empty.
46+
47+ When this flag is missing, the following code:
48+
49+ ``` C++
50+ ETDumpResult result = etdump_gen.get_etdump_data();
51+ if (result.buf != nullptr && result.size > 0 ) {
52+ ...
53+ }
54+ ```
55+
56+ will always return:
57+
58+ ``` C++
59+ result.buf == nullptr
60+ result.size == 0
61+ ```
62+
63+ This indicates that no ETDump data was collected, and therefore nothing can be analyzed through the Inspector API.
64+
4265## Using an ETDump
4366
4467Pass this ETDump into the [ Inspector API] ( model-inspector.rst ) to access this data and do post-run analysis.
You can’t perform that action at this time.
0 commit comments