Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::ScavengeStats Class Reference

#include <scavenger.h>

Public Member Functions

 ScavengeStats ()
 
 ScavengeStats (int64_t start_micros, int64_t end_micros, SpaceUsage before, SpaceUsage after, intptr_t promo_candidates_in_words, intptr_t promoted_in_words, intptr_t abandoned_in_words)
 
double ExpectedGarbageFraction (intptr_t old_threshold_in_words) const
 
double PromoCandidatesSuccessFraction () const
 
intptr_t UsedBeforeInWords () const
 
int64_t DurationMicros () const
 

Detailed Description

Definition at line 74 of file scavenger.h.

Constructor & Destructor Documentation

◆ ScavengeStats() [1/2]

dart::ScavengeStats::ScavengeStats ( )
inline

Definition at line 76 of file scavenger.h.

76{}

◆ ScavengeStats() [2/2]

dart::ScavengeStats::ScavengeStats ( int64_t  start_micros,
int64_t  end_micros,
SpaceUsage  before,
SpaceUsage  after,
intptr_t  promo_candidates_in_words,
intptr_t  promoted_in_words,
intptr_t  abandoned_in_words 
)
inline

Definition at line 77 of file scavenger.h.

84 : start_micros_(start_micros),
85 end_micros_(end_micros),
86 before_(before),
87 after_(after),
88 promo_candidates_in_words_(promo_candidates_in_words),
89 promoted_in_words_(promoted_in_words),
90 abandoned_in_words_(abandoned_in_words) {}

Member Function Documentation

◆ DurationMicros()

int64_t dart::ScavengeStats::DurationMicros ( ) const
inline

Definition at line 112 of file scavenger.h.

112{ return end_micros_ - start_micros_; }

◆ ExpectedGarbageFraction()

double dart::ScavengeStats::ExpectedGarbageFraction ( intptr_t  old_threshold_in_words) const
inline

Definition at line 95 of file scavenger.h.

95 {
96 double work =
97 after_.used_in_words + promoted_in_words_ + abandoned_in_words_;
98 return 1.0 - (work / old_threshold_in_words);
99 }
RelaxedAtomic< intptr_t > used_in_words
Definition: spaces.h:21

◆ PromoCandidatesSuccessFraction()

double dart::ScavengeStats::PromoCandidatesSuccessFraction ( ) const
inline

Definition at line 103 of file scavenger.h.

103 {
104 return promo_candidates_in_words_ > 0
105 ? promoted_in_words_ /
106 static_cast<double>(promo_candidates_in_words_)
107 : 0.0;
108 }

◆ UsedBeforeInWords()

intptr_t dart::ScavengeStats::UsedBeforeInWords ( ) const
inline

Definition at line 110 of file scavenger.h.

110{ return before_.used_in_words; }

The documentation for this class was generated from the following file: