diff options
author | Cameron McCormack <cam@mcc.id.au> | 2019-10-03 18:14:39 +1000 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2019-10-04 03:20:02 +0200 |
commit | 9e37673c10a58c5c851f8392acf44d6ca3218abd (patch) | |
tree | 122c89afcccf40f70442da9efc1aa3965d94d20f | |
parent | d6b25ed432136ce89217fc475ba63c95f292fb5d (diff) |
Add a couple more timers.
For the remaining named parts of Context::gen.
-rw-r--r-- | src/ir/context.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ir/context.rs b/src/ir/context.rs index 0fefe399..50f1ef5b 100644 --- a/src/ir/context.rs +++ b/src/ir/context.rs @@ -553,6 +553,7 @@ impl BindgenContext { clang_sys::CXTranslationUnit_DetailedPreprocessingRecord; let translation_unit = { + let _t = Timer::new("translation_unit"); let clang_args = if explicit_target { Cow::Borrowed(&options.clang_args) } else { @@ -931,6 +932,8 @@ If you encounter an error missing from this list, please file an issue or a PR!" /// Collect all of our unresolved type references and resolve them. fn resolve_typerefs(&mut self) { + let _t = self.timer("resolve_typerefs"); + let typerefs = self.collect_typerefs(); for (id, ty, loc, parent_id) in typerefs { @@ -987,6 +990,8 @@ If you encounter an error missing from this list, please file an issue or a PR!" /// Compute the bitfield allocation units for all `TypeKind::Comp` items we /// parsed. fn compute_bitfield_units(&mut self) { + let _t = self.timer("compute_bitfield_units"); + assert!(self.collected_typerefs()); let need_bitfield_allocation = |