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

Side by Side Diff: test/cctest/test-serialize.cc

Issue 17157006: Remove unused counters (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 | « src/v8-counters.h ('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 2007-2010 the V8 project authors. All rights reserved. 1 // Copyright 2007-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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 TEST(ExternalReferenceEncoder) { 102 TEST(ExternalReferenceEncoder) {
103 Isolate* isolate = i::Isolate::Current(); 103 Isolate* isolate = i::Isolate::Current();
104 isolate->stats_table()->SetCounterFunction(counter_function); 104 isolate->stats_table()->SetCounterFunction(counter_function);
105 v8::V8::Initialize(); 105 v8::V8::Initialize();
106 106
107 ExternalReferenceEncoder encoder; 107 ExternalReferenceEncoder encoder;
108 CHECK_EQ(make_code(BUILTIN, Builtins::kArrayCode), 108 CHECK_EQ(make_code(BUILTIN, Builtins::kArrayCode),
109 Encode(encoder, Builtins::kArrayCode)); 109 Encode(encoder, Builtins::kArrayCode));
110 CHECK_EQ(make_code(v8::internal::RUNTIME_FUNCTION, Runtime::kAbort), 110 CHECK_EQ(make_code(v8::internal::RUNTIME_FUNCTION, Runtime::kAbort),
111 Encode(encoder, Runtime::kAbort)); 111 Encode(encoder, Runtime::kAbort));
112 ExternalReference keyed_load_function_prototype = 112 ExternalReference total_compile_size =
113 ExternalReference(isolate->counters()->keyed_load_function_prototype()); 113 ExternalReference(isolate->counters()->total_compile_size());
114 CHECK_EQ(make_code(STATS_COUNTER, Counters::k_keyed_load_function_prototype), 114 CHECK_EQ(make_code(STATS_COUNTER, Counters::k_total_compile_size),
115 encoder.Encode(keyed_load_function_prototype.address())); 115 encoder.Encode(total_compile_size.address()));
116 ExternalReference stack_limit_address = 116 ExternalReference stack_limit_address =
117 ExternalReference::address_of_stack_limit(isolate); 117 ExternalReference::address_of_stack_limit(isolate);
118 CHECK_EQ(make_code(UNCLASSIFIED, 4), 118 CHECK_EQ(make_code(UNCLASSIFIED, 4),
119 encoder.Encode(stack_limit_address.address())); 119 encoder.Encode(stack_limit_address.address()));
120 ExternalReference real_stack_limit_address = 120 ExternalReference real_stack_limit_address =
121 ExternalReference::address_of_real_stack_limit(isolate); 121 ExternalReference::address_of_real_stack_limit(isolate);
122 CHECK_EQ(make_code(UNCLASSIFIED, 5), 122 CHECK_EQ(make_code(UNCLASSIFIED, 5),
123 encoder.Encode(real_stack_limit_address.address())); 123 encoder.Encode(real_stack_limit_address.address()));
124 #ifdef ENABLE_DEBUGGER_SUPPORT 124 #ifdef ENABLE_DEBUGGER_SUPPORT
125 CHECK_EQ(make_code(UNCLASSIFIED, 16), 125 CHECK_EQ(make_code(UNCLASSIFIED, 16),
(...skipping 14 matching lines...) Expand all
140 Isolate* isolate = i::Isolate::Current(); 140 Isolate* isolate = i::Isolate::Current();
141 isolate->stats_table()->SetCounterFunction(counter_function); 141 isolate->stats_table()->SetCounterFunction(counter_function);
142 v8::V8::Initialize(); 142 v8::V8::Initialize();
143 143
144 ExternalReferenceDecoder decoder; 144 ExternalReferenceDecoder decoder;
145 CHECK_EQ(AddressOf(Builtins::kArrayCode), 145 CHECK_EQ(AddressOf(Builtins::kArrayCode),
146 decoder.Decode(make_code(BUILTIN, Builtins::kArrayCode))); 146 decoder.Decode(make_code(BUILTIN, Builtins::kArrayCode)));
147 CHECK_EQ(AddressOf(Runtime::kAbort), 147 CHECK_EQ(AddressOf(Runtime::kAbort),
148 decoder.Decode(make_code(v8::internal::RUNTIME_FUNCTION, 148 decoder.Decode(make_code(v8::internal::RUNTIME_FUNCTION,
149 Runtime::kAbort))); 149 Runtime::kAbort)));
150 ExternalReference keyed_load_function = 150 ExternalReference total_compile_size =
151 ExternalReference(isolate->counters()->keyed_load_function_prototype()); 151 ExternalReference(isolate->counters()->total_compile_size());
152 CHECK_EQ(keyed_load_function.address(), 152 CHECK_EQ(total_compile_size.address(),
153 decoder.Decode( 153 decoder.Decode(
154 make_code(STATS_COUNTER, 154 make_code(STATS_COUNTER,
155 Counters::k_keyed_load_function_prototype))); 155 Counters::k_total_compile_size)));
156 CHECK_EQ(ExternalReference::address_of_stack_limit(isolate).address(), 156 CHECK_EQ(ExternalReference::address_of_stack_limit(isolate).address(),
157 decoder.Decode(make_code(UNCLASSIFIED, 4))); 157 decoder.Decode(make_code(UNCLASSIFIED, 4)));
158 CHECK_EQ(ExternalReference::address_of_real_stack_limit(isolate).address(), 158 CHECK_EQ(ExternalReference::address_of_real_stack_limit(isolate).address(),
159 decoder.Decode(make_code(UNCLASSIFIED, 5))); 159 decoder.Decode(make_code(UNCLASSIFIED, 5)));
160 #ifdef ENABLE_DEBUGGER_SUPPORT 160 #ifdef ENABLE_DEBUGGER_SUPPORT
161 CHECK_EQ(ExternalReference::debug_break(isolate).address(), 161 CHECK_EQ(ExternalReference::debug_break(isolate).address(),
162 decoder.Decode(make_code(UNCLASSIFIED, 16))); 162 decoder.Decode(make_code(UNCLASSIFIED, 16)));
163 #endif // ENABLE_DEBUGGER_SUPPORT 163 #endif // ENABLE_DEBUGGER_SUPPORT
164 CHECK_EQ(ExternalReference::new_space_start(isolate).address(), 164 CHECK_EQ(ExternalReference::new_space_start(isolate).address(),
165 decoder.Decode(make_code(UNCLASSIFIED, 10))); 165 decoder.Decode(make_code(UNCLASSIFIED, 10)));
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 TEST(TestThatAlwaysFails) { 637 TEST(TestThatAlwaysFails) {
638 bool ArtificialFailure = false; 638 bool ArtificialFailure = false;
639 CHECK(ArtificialFailure); 639 CHECK(ArtificialFailure);
640 } 640 }
641 641
642 642
643 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { 643 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) {
644 bool ArtificialFailure2 = false; 644 bool ArtificialFailure2 = false;
645 CHECK(ArtificialFailure2); 645 CHECK(ArtificialFailure2);
646 } 646 }
OLDNEW
« no previous file with comments | « src/v8-counters.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698