| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 5894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5905 " throw 'message 2';" | 5905 " throw 'message 2';" |
| 5906 "} finally {" | 5906 "} finally {" |
| 5907 " break L;" | 5907 " break L;" |
| 5908 "}" | 5908 "}" |
| 5909 "check();"; | 5909 "check();"; |
| 5910 CompileRun(test); | 5910 CompileRun(test); |
| 5911 | 5911 |
| 5912 const char* flag = "--turbo-filter=*"; | 5912 const char* flag = "--turbo-filter=*"; |
| 5913 FlagList::SetFlagsFromString(flag, StrLength(flag)); | 5913 FlagList::SetFlagsFromString(flag, StrLength(flag)); |
| 5914 FLAG_always_opt = true; | 5914 FLAG_always_opt = true; |
| 5915 FLAG_turbo_exceptions = true; | 5915 FLAG_turbo_try_catch = true; |
| 5916 FLAG_turbo_try_finally = true; |
| 5916 | 5917 |
| 5917 CompileRun(test); | 5918 CompileRun(test); |
| 5918 } | 5919 } |
| 5919 | 5920 |
| 5920 | 5921 |
| 5921 TEST(OldGenerationAllocationThroughput) { | 5922 TEST(OldGenerationAllocationThroughput) { |
| 5922 CcTest::InitializeVM(); | 5923 CcTest::InitializeVM(); |
| 5923 v8::HandleScope scope(CcTest::isolate()); | 5924 v8::HandleScope scope(CcTest::isolate()); |
| 5924 Isolate* isolate = CcTest::i_isolate(); | 5925 Isolate* isolate = CcTest::i_isolate(); |
| 5925 Heap* heap = isolate->heap(); | 5926 Heap* heap = isolate->heap(); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 5953 size_t counter2 = 2000; | 5954 size_t counter2 = 2000; |
| 5954 tracer->SampleAllocation(time2, counter2, counter2); | 5955 tracer->SampleAllocation(time2, counter2, counter2); |
| 5955 size_t throughput = tracer->AllocationThroughputInBytesPerMillisecond(100); | 5956 size_t throughput = tracer->AllocationThroughputInBytesPerMillisecond(100); |
| 5956 CHECK_EQ(2 * (counter2 - counter1) / (time2 - time1), throughput); | 5957 CHECK_EQ(2 * (counter2 - counter1) / (time2 - time1), throughput); |
| 5957 int time3 = 1000; | 5958 int time3 = 1000; |
| 5958 size_t counter3 = 30000; | 5959 size_t counter3 = 30000; |
| 5959 tracer->SampleAllocation(time3, counter3, counter3); | 5960 tracer->SampleAllocation(time3, counter3, counter3); |
| 5960 throughput = tracer->AllocationThroughputInBytesPerMillisecond(100); | 5961 throughput = tracer->AllocationThroughputInBytesPerMillisecond(100); |
| 5961 CHECK_EQ(2 * (counter3 - counter1) / (time3 - time1), throughput); | 5962 CHECK_EQ(2 * (counter3 - counter1) / (time3 - time1), throughput); |
| 5962 } | 5963 } |
| OLD | NEW |