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

Side by Side Diff: runtime/vm/benchmark_test.cc

Issue 2654183002: Rename references to "external pages" as "snapshot pages" to avoid confusion with the kind of exter… (Closed)
Patch Set: image Created 3 years, 10 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
« no previous file with comments | « no previous file | runtime/vm/clustered_snapshot.h » ('j') | runtime/vm/isolate.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/benchmark_test.h" 5 #include "vm/benchmark_test.h"
6 6
7 #include "bin/builtin.h" 7 #include "bin/builtin.h"
8 #include "bin/file.h" 8 #include "bin/file.h"
9 #include "bin/isolate_data.h" 9 #include "bin/isolate_data.h"
10 10
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 uint8_t* vm_snapshot_data_buffer; 514 uint8_t* vm_snapshot_data_buffer;
515 uint8_t* isolate_snapshot_data_buffer; 515 uint8_t* isolate_snapshot_data_buffer;
516 // Need to load the script into the dart: core library due to 516 // Need to load the script into the dart: core library due to
517 // the import of dart:_internal. 517 // the import of dart:_internal.
518 TestCase::LoadCoreTestScript(kScriptChars, NULL); 518 TestCase::LoadCoreTestScript(kScriptChars, NULL);
519 Api::CheckAndFinalizePendingClasses(thread); 519 Api::CheckAndFinalizePendingClasses(thread);
520 520
521 // Write snapshot with object content. 521 // Write snapshot with object content.
522 FullSnapshotWriter writer(Snapshot::kCore, &vm_snapshot_data_buffer, 522 FullSnapshotWriter writer(Snapshot::kCore, &vm_snapshot_data_buffer,
523 &isolate_snapshot_data_buffer, &malloc_allocator, 523 &isolate_snapshot_data_buffer, &malloc_allocator,
524 NULL, NULL /* instructions_writer */); 524 NULL, NULL /* image_writer */);
525 writer.WriteFullSnapshot(); 525 writer.WriteFullSnapshot();
526 const Snapshot* snapshot = 526 const Snapshot* snapshot =
527 Snapshot::SetupFromBuffer(isolate_snapshot_data_buffer); 527 Snapshot::SetupFromBuffer(isolate_snapshot_data_buffer);
528 ASSERT(snapshot->kind() == Snapshot::kCore); 528 ASSERT(snapshot->kind() == Snapshot::kCore);
529 benchmark->set_score(snapshot->length()); 529 benchmark->set_score(snapshot->length());
530 530
531 free(vm_snapshot_data_buffer); 531 free(vm_snapshot_data_buffer);
532 free(isolate_snapshot_data_buffer); 532 free(isolate_snapshot_data_buffer);
533 } 533 }
534 534
(...skipping 17 matching lines...) Expand all
552 uint8_t* vm_snapshot_data_buffer; 552 uint8_t* vm_snapshot_data_buffer;
553 uint8_t* isolate_snapshot_data_buffer; 553 uint8_t* isolate_snapshot_data_buffer;
554 // Need to load the script into the dart: core library due to 554 // Need to load the script into the dart: core library due to
555 // the import of dart:_internal. 555 // the import of dart:_internal.
556 TestCase::LoadCoreTestScript(kScriptChars, NULL); 556 TestCase::LoadCoreTestScript(kScriptChars, NULL);
557 Api::CheckAndFinalizePendingClasses(thread); 557 Api::CheckAndFinalizePendingClasses(thread);
558 558
559 // Write snapshot with object content. 559 // Write snapshot with object content.
560 FullSnapshotWriter writer(Snapshot::kCore, &vm_snapshot_data_buffer, 560 FullSnapshotWriter writer(Snapshot::kCore, &vm_snapshot_data_buffer,
561 &isolate_snapshot_data_buffer, &malloc_allocator, 561 &isolate_snapshot_data_buffer, &malloc_allocator,
562 NULL, NULL /* instructions_writer */); 562 NULL, NULL /* image_writer */);
563 writer.WriteFullSnapshot(); 563 writer.WriteFullSnapshot();
564 const Snapshot* snapshot = 564 const Snapshot* snapshot =
565 Snapshot::SetupFromBuffer(isolate_snapshot_data_buffer); 565 Snapshot::SetupFromBuffer(isolate_snapshot_data_buffer);
566 ASSERT(snapshot->kind() == Snapshot::kCore); 566 ASSERT(snapshot->kind() == Snapshot::kCore);
567 benchmark->set_score(snapshot->length()); 567 benchmark->set_score(snapshot->length());
568 568
569 free(vm_snapshot_data_buffer); 569 free(vm_snapshot_data_buffer);
570 free(isolate_snapshot_data_buffer); 570 free(isolate_snapshot_data_buffer);
571 } 571 }
572 572
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 int64_t elapsed_time = timer.TotalElapsedTime(); 723 int64_t elapsed_time = timer.TotalElapsedTime();
724 benchmark->set_score(elapsed_time); 724 benchmark->set_score(elapsed_time);
725 } 725 }
726 726
727 727
728 BENCHMARK_MEMORY(InitialRSS) { 728 BENCHMARK_MEMORY(InitialRSS) {
729 benchmark->set_score(OS::MaxRSS()); 729 benchmark->set_score(OS::MaxRSS());
730 } 730 }
731 731
732 } // namespace dart 732 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/clustered_snapshot.h » ('j') | runtime/vm/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698