Skip to content

Commit 538bfaf

Browse files
authored
Add util function in etdump to get debug buffer size
Differential Revision: D66855639 Pull Request resolved: #7228
1 parent dd08abc commit 538bfaf

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

devtools/etdump/etdump_flatcc.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,5 +635,9 @@ bool ETDumpGen::is_static_etdump() {
635635
return alloc_.data != nullptr;
636636
}
637637

638+
size_t ETDumpGen::get_debug_buffer_size() const {
639+
return debug_buffer_.size();
640+
}
641+
638642
} // namespace etdump
639643
} // namespace executorch

devtools/etdump/etdump_flatcc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ class ETDumpGen : public ::executorch::runtime::EventTracer {
138138
const double& output) override;
139139
void set_debug_buffer(::executorch::runtime::Span<uint8_t> buffer);
140140
ETDumpResult get_etdump_data();
141+
size_t get_debug_buffer_size() const;
141142
size_t get_num_blocks();
142143
bool is_static_etdump();
143144
void reset();

0 commit comments

Comments
 (0)