#include <pages.h>
Definition at line 32 of file pages.h.
◆ PageSpaceGarbageCollectionHistory()
dart::PageSpaceGarbageCollectionHistory::PageSpaceGarbageCollectionHistory |
( |
| ) |
|
|
inline |
◆ ~PageSpaceGarbageCollectionHistory()
dart::PageSpaceGarbageCollectionHistory::~PageSpaceGarbageCollectionHistory |
( |
| ) |
|
|
inline |
◆ AddGarbageCollectionTime()
void dart::PageSpaceGarbageCollectionHistory::AddGarbageCollectionTime |
( |
int64_t |
start, |
|
|
int64_t |
end |
|
) |
| |
Definition at line 1774 of file pages.cc.
1775 {
1777 entry.start =
start;
1779 history_.
Add(entry);
1780}
◆ GarbageCollectionTimeFraction()
int dart::PageSpaceGarbageCollectionHistory::GarbageCollectionTimeFraction |
( |
| ) |
|
Definition at line 1782 of file pages.cc.
1782 {
1783 int64_t gc_time = 0;
1784 int64_t total_time = 0;
1785 for (
int i = 0;
i < history_.
Size() - 1;
i++) {
1788 gc_time += current.end - current.start;
1789 total_time += current.end - previous.end;
1790 }
1791 if (total_time == 0) {
1792 return 0;
1793 } else {
1794 ASSERT(total_time >= gc_time);
1795 int result =
static_cast<int>(
1796 (static_cast<double>(gc_time) / static_cast<double>(total_time)) * 100);
1798 }
1799}
const T & Get(int i) const
◆ IsEmpty()
bool dart::PageSpaceGarbageCollectionHistory::IsEmpty |
( |
| ) |
const |
|
inline |
Definition at line 41 of file pages.h.
41{
return history_.
Size() == 0; }
The documentation for this class was generated from the following files:
- third_party/dart-lang/sdk/runtime/vm/heap/pages.h
- third_party/dart-lang/sdk/runtime/vm/heap/pages.cc