diff --git a/compiler/stats.cpp b/compiler/stats.cpp index 4d2b68788..b37816525 100644 --- a/compiler/stats.cpp +++ b/compiler/stats.cpp @@ -44,6 +44,9 @@ void Stats::on_function_processed(FunctionPtr function) { if (function->is_resumable) { ++total_resumable_functions_; } + if (function->is_interruptible) { + ++total_interruptible_functions_; + } if (function->is_inline) { ++total_inline_functions_; } @@ -78,6 +81,7 @@ void Stats::write_to(std::ostream &out, bool with_indent) const { out << indent << "functions.total_inline: " << total_inline_functions_ << std::endl; out << indent << "functions.total_throwing: " << total_throwing_functions_ << std::endl; out << indent << "functions.total_resumable: " << total_resumable_functions_ << std::endl; + out << indent << "functions.total_interruptible: " << total_interruptible_functions_ << std::endl; out << block_sep; out << indent << "memory.rss: " << memory_rss_ * 1024 << std::endl; out << indent << "memory.rss_peak: " << memory_rss_peak_ * 1024 << std::endl; diff --git a/compiler/stats.h b/compiler/stats.h index fa78c56df..ca3ef4707 100644 --- a/compiler/stats.h +++ b/compiler/stats.h @@ -43,6 +43,7 @@ class Stats { std::atomic total_functions_{0u}; std::atomic total_throwing_functions_{0u}; std::atomic total_resumable_functions_{0u}; + std::atomic total_interruptible_functions_{0u}; std::atomic total_inline_functions_{0u}; std::atomic memory_rss_{0};