| 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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 | 677 |
| 678 CompileRun(line_number_test_source_existing_functions); | 678 CompileRun(line_number_test_source_existing_functions); |
| 679 | 679 |
| 680 CpuProfiler profiler(isolate); | 680 CpuProfiler profiler(isolate); |
| 681 profiler.StartProfiling("LineNumber"); | 681 profiler.StartProfiling("LineNumber"); |
| 682 | 682 |
| 683 CompileRun(line_number_test_source_profile_time_functions); | 683 CompileRun(line_number_test_source_profile_time_functions); |
| 684 | 684 |
| 685 profiler.processor()->StopSynchronously(); | 685 profiler.processor()->StopSynchronously(); |
| 686 | 686 |
| 687 bool is_lazy = i::FLAG_lazy && !(i::FLAG_ignition && i::FLAG_ignition_eager); | 687 bool is_lazy = i::FLAG_lazy; |
| 688 CHECK_EQ(1, GetFunctionLineNumber(profiler, env, "foo_at_the_first_line")); | 688 CHECK_EQ(1, GetFunctionLineNumber(profiler, env, "foo_at_the_first_line")); |
| 689 CHECK_EQ(is_lazy ? 0 : 4, | 689 CHECK_EQ(is_lazy ? 0 : 4, |
| 690 GetFunctionLineNumber(profiler, env, "lazy_func_at_forth_line")); | 690 GetFunctionLineNumber(profiler, env, "lazy_func_at_forth_line")); |
| 691 CHECK_EQ(2, GetFunctionLineNumber(profiler, env, "bar_at_the_second_line")); | 691 CHECK_EQ(2, GetFunctionLineNumber(profiler, env, "bar_at_the_second_line")); |
| 692 CHECK_EQ(is_lazy ? 0 : 6, | 692 CHECK_EQ(is_lazy ? 0 : 6, |
| 693 GetFunctionLineNumber(profiler, env, "lazy_func_at_6th_line")); | 693 GetFunctionLineNumber(profiler, env, "lazy_func_at_6th_line")); |
| 694 | 694 |
| 695 profiler.StopProfiling("LineNumber"); | 695 profiler.StopProfiling("LineNumber"); |
| 696 } | 696 } |
| 697 | 697 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 721 // (root) | 721 // (root) |
| 722 // "" | 722 // "" |
| 723 // kDebuggerStatement | 723 // kDebuggerStatement |
| 724 current = PickChild(current, ""); | 724 current = PickChild(current, ""); |
| 725 CHECK(const_cast<v8::CpuProfileNode*>(current)); | 725 CHECK(const_cast<v8::CpuProfileNode*>(current)); |
| 726 | 726 |
| 727 current = PickChild(current, "Debugger"); | 727 current = PickChild(current, "Debugger"); |
| 728 CHECK(const_cast<v8::CpuProfileNode*>(current)); | 728 CHECK(const_cast<v8::CpuProfileNode*>(current)); |
| 729 CHECK(!strcmp("DebuggerStatement", current->GetBailoutReason())); | 729 CHECK(!strcmp("DebuggerStatement", current->GetBailoutReason())); |
| 730 } | 730 } |
| OLD | NEW |