Commit 130b5947 authored by yonghong-song's avatar yonghong-song Committed by GitHub

Merge pull request #1637 from palmtenor/table_move

Add move constructor for BPFStackTable
parents a4110b4f 991a1df2
......@@ -157,6 +157,13 @@ BPFStackTable::BPFStackTable(const TableDesc& desc,
};
}
BPFStackTable::BPFStackTable(BPFStackTable&& that) :
BPFTableBase<int, stacktrace_t>(that.desc),
symbol_option_(std::move(that.symbol_option_)),
pid_sym_(std::move(that.pid_sym_)) {
that.pid_sym_.clear();
}
BPFStackTable::~BPFStackTable() {
for (auto it : pid_sym_)
bcc_free_symcache(it.second, it.first);
......
......@@ -289,6 +289,7 @@ class BPFStackTable : public BPFTableBase<int, stacktrace_t> {
BPFStackTable(const TableDesc& desc,
bool use_debug_file,
bool check_debug_file_crc);
BPFStackTable(BPFStackTable&& that);
~BPFStackTable();
void clear_table_non_atomic();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment