| 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 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1157 // 71 70 start [-1] #3 | 1157 // 71 70 start [-1] #3 |
| 1158 // 1 1 bar [-1] #7 | 1158 // 1 1 bar [-1] #7 |
| 1159 // 19 19 (program) [-1] #2 | 1159 // 19 19 (program) [-1] #2 |
| 1160 TEST(FunctionCallSample) { | 1160 TEST(FunctionCallSample) { |
| 1161 i::FLAG_allow_natives_syntax = true; | 1161 i::FLAG_allow_natives_syntax = true; |
| 1162 LocalContext env; | 1162 LocalContext env; |
| 1163 v8::HandleScope scope(env->GetIsolate()); | 1163 v8::HandleScope scope(env->GetIsolate()); |
| 1164 | 1164 |
| 1165 // Collect garbage that might have be generated while installing | 1165 // Collect garbage that might have be generated while installing |
| 1166 // extensions. | 1166 // extensions. |
| 1167 CcTest::heap()->CollectAllGarbage(); | 1167 CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); |
| 1168 | 1168 |
| 1169 CompileRun(call_function_test_source); | 1169 CompileRun(call_function_test_source); |
| 1170 v8::Local<v8::Function> function = GetFunction(env.local(), "start"); | 1170 v8::Local<v8::Function> function = GetFunction(env.local(), "start"); |
| 1171 | 1171 |
| 1172 ProfilerHelper helper(env.local()); | 1172 ProfilerHelper helper(env.local()); |
| 1173 int32_t duration_ms = 100; | 1173 int32_t duration_ms = 100; |
| 1174 v8::Local<v8::Value> args[] = { | 1174 v8::Local<v8::Value> args[] = { |
| 1175 v8::Integer::New(env->GetIsolate(), duration_ms)}; | 1175 v8::Integer::New(env->GetIsolate(), duration_ms)}; |
| 1176 v8::CpuProfile* profile = helper.Run(function, args, arraysize(args), 1000); | 1176 v8::CpuProfile* profile = helper.Run(function, args, arraysize(args), 1000); |
| 1177 | 1177 |
| (...skipping 905 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 |