| Index: runtime/vm/profiler_service.cc
|
| diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc
|
| index 09d4d433f4bad784d0d5386bb35f39c79cf311b2..f47078f431e4e703a89cbf8ad219281ed7422138 100644
|
| --- a/runtime/vm/profiler_service.cc
|
| +++ b/runtime/vm/profiler_service.cc
|
| @@ -17,6 +17,7 @@ namespace dart {
|
|
|
| DECLARE_FLAG(int, max_profile_depth);
|
| DECLARE_FLAG(int, profile_period);
|
| +DECLARE_FLAG(bool, show_invisible_frames);
|
|
|
| DEFINE_FLAG(bool, trace_profiler, false, "Trace profiler.");
|
|
|
| @@ -137,6 +138,15 @@ const char* ProfileFunction::Name() const {
|
| }
|
|
|
|
|
| +bool ProfileFunction::is_visible() const {
|
| + if (function_.IsNull()) {
|
| + // Some synthetic function.
|
| + return true;
|
| + }
|
| + return FLAG_show_invisible_frames || function_.is_visible();
|
| +}
|
| +
|
| +
|
| void ProfileFunction::Tick(bool exclusive,
|
| intptr_t inclusive_serial,
|
| TokenPosition token_position) {
|
| @@ -1615,6 +1625,9 @@ class ProfileBuilder : public ValueObject {
|
| ProfileFunction* function,
|
| TokenPosition token_position,
|
| intptr_t code_index) {
|
| + if (!function->is_visible()) {
|
| + return current;
|
| + }
|
| if (tick_functions_) {
|
| if (FLAG_trace_profiler) {
|
| THR_Print("S[%" Pd "]F[%" Pd "] %s %s 0x%" Px "\n",
|
|
|