Flutter Engine
The Flutter Engine
Classes | Public Types | Public Member Functions | List of all members
dart::CompilerTimings Class Reference

#include <compiler_timings.h>

Inheritance diagram for dart::CompilerTimings:
dart::MallocAllocated

Classes

class  Scope
 

Public Types

enum  TimerId
 

Public Member Functions

 CompilerTimings ()
 
void RecordInliningStatsByOutcome (bool success, const Timer &timer)
 
void Print ()
 
- Public Member Functions inherited from dart::MallocAllocated
 MallocAllocated ()
 
void * operator new (size_t size)
 
void * operator new[] (size_t size)
 
void operator delete (void *pointer)
 
void operator delete[] (void *pointer)
 

Detailed Description

Definition at line 68 of file compiler_timings.h.

Member Enumeration Documentation

◆ TimerId

Definition at line 80 of file compiler_timings.h.

80 {
81#define DECLARE_TIMER_ID(Name) k##Name,
83#undef DECLARE_TIMER_ID
84 };
#define DECLARE_TIMER_ID(Name)
#define COMPILER_TIMERS_LIST(V)

Constructor & Destructor Documentation

◆ CompilerTimings()

dart::CompilerTimings::CompilerTimings ( )
inline

Definition at line 118 of file compiler_timings.h.

118{ total_.Start(); }
void Start()
Definition: timer.h:111

Member Function Documentation

◆ Print()

void dart::CompilerTimings::Print ( )

Definition at line 93 of file compiler_timings.cc.

93 {
94 Zone* zone = Thread::Current()->zone();
95
96 OS::PrintErr("Precompilation took: %s\n",
97 total_.FormatElapsedHumanReadable(zone));
98
99 PrintTimers(zone, root_, total_, 0);
100
101 OS::PrintErr("Inlining by outcome\n Success: %s\n Failure: %s\n",
102 try_inlining_success_.FormatElapsedHumanReadable(zone),
103 try_inlining_failure_.FormatElapsedHumanReadable(zone));
104}
static void static void PrintErr(const char *format,...) PRINTF_ATTRIBUTE(1
Zone * zone() const
Definition: thread_state.h:37
static Thread * Current()
Definition: thread.h:362
const char * FormatElapsedHumanReadable(Zone *zone) const
Definition: timer.h:140

◆ RecordInliningStatsByOutcome()

void dart::CompilerTimings::RecordInliningStatsByOutcome ( bool  success,
const Timer timer 
)
inline

Definition at line 120 of file compiler_timings.h.

120 {
121 if (success) {
122 try_inlining_success_.AddTotal(timer);
123 } else {
124 try_inlining_failure_.AddTotal(timer);
125 }
126 }
void AddTotal(const Timer &other)
Definition: timer.h:135

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