OLD | NEW |
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 Loading... |
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_ |
OLD | NEW |