| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 profiler_listener.AddObserver(&profiler); | 235 profiler_listener.AddObserver(&profiler); |
| 236 | 236 |
| 237 profiler_listener.CodeCreateEvent(i::Logger::BUILTIN_TAG, frame1_code, "bbb"); | 237 profiler_listener.CodeCreateEvent(i::Logger::BUILTIN_TAG, frame1_code, "bbb"); |
| 238 profiler_listener.CodeCreateEvent(i::Logger::STUB_TAG, frame2_code, 5); | 238 profiler_listener.CodeCreateEvent(i::Logger::STUB_TAG, frame2_code, 5); |
| 239 profiler_listener.CodeCreateEvent(i::Logger::BUILTIN_TAG, frame3_code, "ddd"); | 239 profiler_listener.CodeCreateEvent(i::Logger::BUILTIN_TAG, frame3_code, "ddd"); |
| 240 | 240 |
| 241 EnqueueTickSampleEvent(processor, frame1_code->instruction_start()); | 241 EnqueueTickSampleEvent(processor, frame1_code->instruction_start()); |
| 242 EnqueueTickSampleEvent( | 242 EnqueueTickSampleEvent( |
| 243 processor, | 243 processor, |
| 244 frame2_code->instruction_start() + frame2_code->ExecutableSize() / 2, | 244 frame2_code->instruction_start() + frame2_code->ExecutableSize() / 2, |
| 245 frame1_code->instruction_start() + frame2_code->ExecutableSize() / 2); | 245 frame1_code->instruction_start() + frame1_code->ExecutableSize() / 2); |
| 246 EnqueueTickSampleEvent(processor, frame3_code->instruction_end() - 1, | 246 EnqueueTickSampleEvent(processor, frame3_code->instruction_end() - 1, |
| 247 frame2_code->instruction_end() - 1, | 247 frame2_code->instruction_end() - 1, |
| 248 frame1_code->instruction_end() - 1); | 248 frame1_code->instruction_end() - 1); |
| 249 | 249 |
| 250 profiler_listener.RemoveObserver(&profiler); | 250 profiler_listener.RemoveObserver(&profiler); |
| 251 isolate->code_event_dispatcher()->RemoveListener(&profiler_listener); | 251 isolate->code_event_dispatcher()->RemoveListener(&profiler_listener); |
| 252 processor->StopSynchronously(); | 252 processor->StopSynchronously(); |
| 253 CpuProfile* profile = profiles->StopProfiling(""); | 253 CpuProfile* profile = profiles->StopProfiling(""); |
| 254 CHECK(profile); | 254 CHECK(profile); |
| 255 | 255 |
| (...skipping 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2083 iprofile->Print(); | 2083 iprofile->Print(); |
| 2084 v8::CpuProfile* profile = reinterpret_cast<v8::CpuProfile*>(iprofile); | 2084 v8::CpuProfile* profile = reinterpret_cast<v8::CpuProfile*>(iprofile); |
| 2085 | 2085 |
| 2086 const char* branch[] = {"", "test"}; | 2086 const char* branch[] = {"", "test"}; |
| 2087 const ProfileNode* itest_node = | 2087 const ProfileNode* itest_node = |
| 2088 GetSimpleBranch(env, profile, branch, arraysize(branch)); | 2088 GetSimpleBranch(env, profile, branch, arraysize(branch)); |
| 2089 CHECK_EQ(0U, itest_node->deopt_infos().size()); | 2089 CHECK_EQ(0U, itest_node->deopt_infos().size()); |
| 2090 | 2090 |
| 2091 iprofiler->DeleteProfile(iprofile); | 2091 iprofiler->DeleteProfile(iprofile); |
| 2092 } | 2092 } |
| OLD | NEW |