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

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

Issue 328343003: Remove dependency on Vector from platform files (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 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/test-parsing.cc ('k') | test/cctest/test-serialize.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 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 } 595 }
596 } 596 }
597 597
598 598
599 TEST(Issue51919) { 599 TEST(Issue51919) {
600 CpuProfilesCollection collection(CcTest::heap()); 600 CpuProfilesCollection collection(CcTest::heap());
601 i::EmbeddedVector<char*, 601 i::EmbeddedVector<char*,
602 CpuProfilesCollection::kMaxSimultaneousProfiles> titles; 602 CpuProfilesCollection::kMaxSimultaneousProfiles> titles;
603 for (int i = 0; i < CpuProfilesCollection::kMaxSimultaneousProfiles; ++i) { 603 for (int i = 0; i < CpuProfilesCollection::kMaxSimultaneousProfiles; ++i) {
604 i::Vector<char> title = i::Vector<char>::New(16); 604 i::Vector<char> title = i::Vector<char>::New(16);
605 i::OS::SNPrintF(title, "%d", i); 605 i::SNPrintF(title, "%d", i);
606 CHECK(collection.StartProfiling(title.start(), false)); 606 CHECK(collection.StartProfiling(title.start(), false));
607 titles[i] = title.start(); 607 titles[i] = title.start();
608 } 608 }
609 CHECK(!collection.StartProfiling("maximum", false)); 609 CHECK(!collection.StartProfiling("maximum", false));
610 for (int i = 0; i < CpuProfilesCollection::kMaxSimultaneousProfiles; ++i) 610 for (int i = 0; i < CpuProfilesCollection::kMaxSimultaneousProfiles; ++i)
611 i::DeleteArray(titles[i]); 611 i::DeleteArray(titles[i]);
612 } 612 }
613 613
614 614
615 static const v8::CpuProfileNode* PickChild(const v8::CpuProfileNode* parent, 615 static const v8::CpuProfileNode* PickChild(const v8::CpuProfileNode* parent,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 CHECK_NE(NULL, const_cast<v8::CpuProfileNode*>(current)); 767 CHECK_NE(NULL, const_cast<v8::CpuProfileNode*>(current));
768 768
769 current = PickChild(current, "TryFinally"); 769 current = PickChild(current, "TryFinally");
770 CHECK_NE(NULL, const_cast<v8::CpuProfileNode*>(current)); 770 CHECK_NE(NULL, const_cast<v8::CpuProfileNode*>(current));
771 CHECK(!strcmp("TryFinallyStatement", current->GetBailoutReason())); 771 CHECK(!strcmp("TryFinallyStatement", current->GetBailoutReason()));
772 772
773 current = PickChild(current, "TryCatch"); 773 current = PickChild(current, "TryCatch");
774 CHECK_NE(NULL, const_cast<v8::CpuProfileNode*>(current)); 774 CHECK_NE(NULL, const_cast<v8::CpuProfileNode*>(current));
775 CHECK(!strcmp("TryCatchStatement", current->GetBailoutReason())); 775 CHECK(!strcmp("TryCatchStatement", current->GetBailoutReason()));
776 } 776 }
OLDNEW
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698