Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Side by Side Diff: src/cpu-profiler-inl.h

Issue 1539038: Report approximated duration in milliseconds for profile nodes. (Closed)
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/cpu-profiler.cc ('k') | src/log.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 result->filler = 1; 64 result->filler = 1;
65 ASSERT(result->filler != SamplingCircularQueue::kClear); 65 ASSERT(result->filler != SamplingCircularQueue::kClear);
66 // Init the required fields only. 66 // Init the required fields only.
67 result->sample.pc = NULL; 67 result->sample.pc = NULL;
68 result->sample.frames_count = 0; 68 result->sample.frames_count = 0;
69 return result; 69 return result;
70 } 70 }
71 71
72 72
73 TickSample* ProfilerEventsProcessor::TickSampleEvent() { 73 TickSample* ProfilerEventsProcessor::TickSampleEvent() {
74 generator_->Tick();
74 TickSampleEventRecord* evt = 75 TickSampleEventRecord* evt =
75 TickSampleEventRecord::init(ticks_buffer_.Enqueue()); 76 TickSampleEventRecord::init(ticks_buffer_.Enqueue());
76 evt->order = enqueue_order_; // No increment! 77 evt->order = enqueue_order_; // No increment!
77 return &evt->sample; 78 return &evt->sample;
78 } 79 }
79 80
80 81
81 bool ProfilerEventsProcessor::FilterOutCodeCreateEvent( 82 bool ProfilerEventsProcessor::FilterOutCodeCreateEvent(
82 Logger::LogEventsAndTags tag) { 83 Logger::LogEventsAndTags tag) {
83 // In browser mode, leave only callbacks and non-native JS entries. 84 // In browser mode, leave only callbacks and non-native JS entries.
84 // We filter out regular expressions as currently we can't tell 85 // We filter out regular expressions as currently we can't tell
85 // whether they origin from native scripts, so let's not confise people by 86 // whether they origin from native scripts, so let's not confise people by
86 // showing them weird regexes they didn't wrote. 87 // showing them weird regexes they didn't wrote.
87 return FLAG_prof_browser_mode 88 return FLAG_prof_browser_mode
88 && (tag != Logger::CALLBACK_TAG 89 && (tag != Logger::CALLBACK_TAG
89 && tag != Logger::FUNCTION_TAG 90 && tag != Logger::FUNCTION_TAG
90 && tag != Logger::LAZY_COMPILE_TAG 91 && tag != Logger::LAZY_COMPILE_TAG
91 && tag != Logger::SCRIPT_TAG); 92 && tag != Logger::SCRIPT_TAG);
92 } 93 }
93 94
94 } } // namespace v8::internal 95 } } // namespace v8::internal
95 96
96 #endif // ENABLE_LOGGING_AND_PROFILING 97 #endif // ENABLE_LOGGING_AND_PROFILING
97 98
98 #endif // V8_CPU_PROFILER_INL_H_ 99 #endif // V8_CPU_PROFILER_INL_H_
OLDNEW
« no previous file with comments | « src/cpu-profiler.cc ('k') | src/log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698