|
32 | 32 | #include "src/assembler-inl.h" |
33 | 33 | #include "src/code-stubs.h" |
34 | 34 | #include "src/compilation-cache.h" |
35 | | -#include "src/context-measure.h" |
36 | 35 | #include "src/debug/debug.h" |
37 | 36 | #include "src/deoptimizer.h" |
38 | 37 | #include "src/elements.h" |
@@ -5867,53 +5866,6 @@ TEST(RemoveCodeFromSharedFunctionInfoButNotFromClosure) { |
5867 | 5866 | "check(g1, g2);"); |
5868 | 5867 | } |
5869 | 5868 |
|
5870 | | -TEST(ContextMeasure) { |
5871 | | - CcTest::InitializeVM(); |
5872 | | - v8::HandleScope scope(CcTest::isolate()); |
5873 | | - Isolate* isolate = CcTest::i_isolate(); |
5874 | | - LocalContext context; |
5875 | | - |
5876 | | - int size_upper_limit = 0; |
5877 | | - int count_upper_limit = 0; |
5878 | | - HeapIterator it(CcTest::heap()); |
5879 | | - for (HeapObject* obj = it.next(); obj != NULL; obj = it.next()) { |
5880 | | - size_upper_limit += obj->Size(); |
5881 | | - count_upper_limit++; |
5882 | | - } |
5883 | | - |
5884 | | - ContextMeasure measure(*isolate->native_context()); |
5885 | | - |
5886 | | - PrintF("Context size : %d bytes\n", measure.Size()); |
5887 | | - PrintF("Context object count: %d\n", measure.Count()); |
5888 | | - |
5889 | | - CHECK_LE(1000, measure.Count()); |
5890 | | - CHECK_LE(50000, measure.Size()); |
5891 | | - |
5892 | | - CHECK_LE(measure.Count(), count_upper_limit); |
5893 | | - CHECK_LE(measure.Size(), size_upper_limit); |
5894 | | -} |
5895 | | - |
5896 | | -TEST(ContextMeasureNoMap) { |
5897 | | - CcTest::InitializeVM(); |
5898 | | - v8::HandleScope scope(CcTest::isolate()); |
5899 | | - |
5900 | | - Local<v8::Context> current_context = CcTest::isolate()->GetCurrentContext(); |
5901 | | - Local<v8::Context> other_context = v8::Context::New(CcTest::isolate()); |
5902 | | - |
5903 | | - CompileRun(current_context, "var x = []"); |
5904 | | - |
5905 | | - size_t original_size_current = current_context->EstimatedSize(); |
5906 | | - size_t original_size_other = other_context->EstimatedSize(); |
5907 | | - |
5908 | | - CompileRun(current_context, "x.a = 1;"); |
5909 | | - |
5910 | | - size_t new_size_current = current_context->EstimatedSize(); |
5911 | | - size_t new_size_other = other_context->EstimatedSize(); |
5912 | | - |
5913 | | - CHECK_LT(original_size_current, new_size_current); |
5914 | | - CHECK_EQ(original_size_other, new_size_other); |
5915 | | -} |
5916 | | - |
5917 | 5869 | TEST(ScriptIterator) { |
5918 | 5870 | CcTest::InitializeVM(); |
5919 | 5871 | v8::HandleScope scope(CcTest::isolate()); |
|
0 commit comments