Skip to content

Commit

Permalink
Allow interrupting memtrace report with Ctrl+C
Browse files Browse the repository at this point in the history
Performance impact:
Before: 948.1 ms ±   9.8 ms
After:  960.0 ms ±  41.7 ms

Closes #103
  • Loading branch information
mephi42 committed Aug 17, 2024
1 parent 7f2b613 commit cd2eede
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions memtrace_ext/memtrace_ext.cc
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,9 @@ class Trace : public TraceBase {

template <typename V, typename F>
int VisitOne(V* visitor, const F& filter) {
if (PyErr_CheckSignals()) {
boost::python::throw_error_already_set();
}
if (!Have(Tlv<E, W>::kFixedLength)) return -EINVAL;
Tlv<E, W> tlv(cur_);
if (!Have(tlv.GetAlignedLength())) return -EINVAL;
Expand Down

0 comments on commit cd2eede

Please sign in to comment.