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

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

Issue 1523015: C++ profiles processor: align browser mode with the old implementation, sample VM state. (Closed)
Patch Set: Using Script::type to filter out native scripts. 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/globals.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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 59
60 60
61 TickSample* ProfilerEventsProcessor::TickSampleEvent() { 61 TickSample* ProfilerEventsProcessor::TickSampleEvent() {
62 TickSampleEventRecord* evt = 62 TickSampleEventRecord* evt =
63 TickSampleEventRecord::cast(ticks_buffer_.Enqueue()); 63 TickSampleEventRecord::cast(ticks_buffer_.Enqueue());
64 evt->order = enqueue_order_; // No increment! 64 evt->order = enqueue_order_; // No increment!
65 return &evt->sample; 65 return &evt->sample;
66 } 66 }
67 67
68
69 bool ProfilerEventsProcessor::FilterOutCodeCreateEvent(
70 Logger::LogEventsAndTags tag) {
71 // In browser mode, leave only callbacks and non-native JS entries.
72 // We filter out regular expressions as currently we can't tell
73 // whether they origin from native scripts, so let's not confise people by
74 // showing them weird regexes they didn't wrote.
75 return FLAG_prof_browser_mode
76 && (tag != Logger::CALLBACK_TAG
77 && tag != Logger::FUNCTION_TAG
78 && tag != Logger::LAZY_COMPILE_TAG
79 && tag != Logger::SCRIPT_TAG);
80 }
81
68 } } // namespace v8::internal 82 } } // namespace v8::internal
69 83
70 #endif // ENABLE_CPP_PROFILES_PROCESSOR 84 #endif // ENABLE_CPP_PROFILES_PROCESSOR
71 85
72 #endif // V8_CPU_PROFILER_INL_H_ 86 #endif // V8_CPU_PROFILER_INL_H_
OLDNEW
« no previous file with comments | « src/cpu-profiler.cc ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698