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

Side by Side Diff: test/cctest/test-cpu-profiler.cc

Issue 2310143002: [heap] Introduce enum of garbage collection reasons. (Closed)
Patch Set: rebase Created 4 years, 3 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 | « test/cctest/test-api-interceptors.cc ('k') | test/cctest/test-debug.cc » ('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 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « test/cctest/test-api-interceptors.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698