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

Side by Side Diff: test/cctest/test-profile-generator.cc

Issue 15786005: Mark test-profile-generator/RecordStackTraceAtStartProfiling as always passing (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | 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 857 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 868
869 TEST(RecordStackTraceAtStartProfiling) { 869 TEST(RecordStackTraceAtStartProfiling) {
870 // This test does not pass with inlining enabled since inlined functions 870 // This test does not pass with inlining enabled since inlined functions
871 // don't appear in the stack trace. 871 // don't appear in the stack trace.
872 i::FLAG_use_inlining = false; 872 i::FLAG_use_inlining = false;
873 873
874 v8::Isolate* isolate = v8::Isolate::GetCurrent(); 874 v8::Isolate* isolate = v8::Isolate::GetCurrent();
875 v8::HandleScope scope(isolate); 875 v8::HandleScope scope(isolate);
876 const char* extensions[] = { "v8/profiler" }; 876 const char* extensions[] = { "v8/profiler" };
877 v8::ExtensionConfiguration config(1, extensions); 877 v8::ExtensionConfiguration config(1, extensions);
878 v8::Local<v8::Context> context = v8::Context::New(isolate); 878 v8::Local<v8::Context> context = v8::Context::New(isolate, &config);
879 context->Enter(); 879 context->Enter();
880 880
881 CpuProfiler* profiler = i::Isolate::Current()->cpu_profiler(); 881 CpuProfiler* profiler = i::Isolate::Current()->cpu_profiler();
882 CHECK_EQ(0, profiler->GetProfilesCount()); 882 CHECK_EQ(0, profiler->GetProfilesCount());
883 CompileRun( 883 CompileRun(
884 "function c() { startProfiling(); }\n" 884 "function c() { startProfiling(); }\n"
885 "function b() { c(); }\n" 885 "function b() { c(); }\n"
886 "function a() { b(); }\n" 886 "function a() { b(); }\n"
887 "a();\n" 887 "a();\n"
888 "stopProfiling();"); 888 "stopProfiling();");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 i::OS::SNPrintF(title, "%d", i); 926 i::OS::SNPrintF(title, "%d", i);
927 // UID must be > 0. 927 // UID must be > 0.
928 CHECK(collection.StartProfiling(title.start(), i + 1, false)); 928 CHECK(collection.StartProfiling(title.start(), i + 1, false));
929 titles[i] = title.start(); 929 titles[i] = title.start();
930 } 930 }
931 CHECK(!collection.StartProfiling( 931 CHECK(!collection.StartProfiling(
932 "maximum", CpuProfilesCollection::kMaxSimultaneousProfiles + 1, false)); 932 "maximum", CpuProfilesCollection::kMaxSimultaneousProfiles + 1, false));
933 for (int i = 0; i < CpuProfilesCollection::kMaxSimultaneousProfiles; ++i) 933 for (int i = 0; i < CpuProfilesCollection::kMaxSimultaneousProfiles; ++i)
934 i::DeleteArray(titles[i]); 934 i::DeleteArray(titles[i]);
935 } 935 }
OLDNEW
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698