pub struct Lowerings { /* private fields */ }Expand description
What the group did to every function a run lowered, in the order they came through.
The same shape crate::pressure::Pressure has and for the same reason: a caller collects one
of these over a whole command line and asks for the listing once at the end.
Implementations§
Source§impl Lowerings
impl Lowerings
Sourcepub fn asked(wanted: bool) -> Self
pub fn asked(wanted: bool) -> Self
The same, told whether to count, which is what -Zlowering=FILE decides.
Sourcepub fn wanted(&self) -> bool
pub fn wanted(&self) -> bool
Whether the counting is worth doing, which is what group is passed.
This is a question and not an assumption for a reason that showed up as soon as the numbers were measured on something large. Counting is a walk of the function per step, and a function’s instructions are a linked list, so on the SQLite amalgamation the walks cost about two seconds on top of nine, which is more than several of the passes they are measuring. A debugging aid nobody asked for should cost nothing, so a run without the flag runs the group and records no numbers at all.
Sourcepub fn merge(&mut self, other: &Self)
pub fn merge(&mut self, other: &Self)
Takes in everything another one recorded, which is how one file’s answer joins a run’s.
Sourcepub fn listing(&self) -> String
pub fn listing(&self) -> String
What -Zlowering=FILE writes.
A comment holding the count and then one block per function. Whoever reads one of these is looking for which step changed a function they are surprised by, so the file is the same text in the same order as the group ran, and every step is there whether it did anything or not. A dump listing only the steps that fired could not tell a step that found nothing from a step somebody forgot to put in the group, which is half of what this is read for.