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

Side by Side Diff: src/heap.h

Issue 11365146: Add GCTracer metrics for a scavenger GC for DOM wrappers (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Comments addressed Created 8 years 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 | « src/global-handles.cc ('k') | src/heap.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 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 2531 matching lines...) Expand 10 before | Expand all | Expand 10 after
2542 // Sets the GC count. 2542 // Sets the GC count.
2543 void set_gc_count(unsigned int count) { gc_count_ = count; } 2543 void set_gc_count(unsigned int count) { gc_count_ = count; }
2544 2544
2545 // Sets the full GC count. 2545 // Sets the full GC count.
2546 void set_full_gc_count(int count) { full_gc_count_ = count; } 2546 void set_full_gc_count(int count) { full_gc_count_ = count; }
2547 2547
2548 void increment_promoted_objects_size(int object_size) { 2548 void increment_promoted_objects_size(int object_size) {
2549 promoted_objects_size_ += object_size; 2549 promoted_objects_size_ += object_size;
2550 } 2550 }
2551 2551
2552 void increment_nodes_died_in_new_space() {
2553 nodes_died_in_new_space_++;
2554 }
2555
2556 void increment_nodes_copied_in_new_space() {
2557 nodes_copied_in_new_space_++;
2558 }
2559
2560 void increment_nodes_promoted() {
2561 nodes_promoted_++;
2562 }
2563
2552 private: 2564 private:
2553 // Returns a string matching the collector. 2565 // Returns a string matching the collector.
2554 const char* CollectorString(); 2566 const char* CollectorString();
2555 2567
2556 // Returns size of object in heap (in MB). 2568 // Returns size of object in heap (in MB).
2557 inline double SizeOfHeapObjects(); 2569 inline double SizeOfHeapObjects();
2558 2570
2559 // Timestamp set in the constructor. 2571 // Timestamp set in the constructor.
2560 double start_time_; 2572 double start_time_;
2561 2573
(...skipping 24 matching lines...) Expand all
2586 // collection and the end of the previous collection. 2598 // collection and the end of the previous collection.
2587 intptr_t allocated_since_last_gc_; 2599 intptr_t allocated_since_last_gc_;
2588 2600
2589 // Amount of time spent in mutator that is time elapsed between end of the 2601 // Amount of time spent in mutator that is time elapsed between end of the
2590 // previous collection and the beginning of the current one. 2602 // previous collection and the beginning of the current one.
2591 double spent_in_mutator_; 2603 double spent_in_mutator_;
2592 2604
2593 // Size of objects promoted during the current collection. 2605 // Size of objects promoted during the current collection.
2594 intptr_t promoted_objects_size_; 2606 intptr_t promoted_objects_size_;
2595 2607
2608 // Number of died nodes in the new space.
2609 int nodes_died_in_new_space_;
2610
2611 // Number of copied nodes to the new space.
2612 int nodes_copied_in_new_space_;
2613
2614 // Number of promoted nodes to the old space.
2615 int nodes_promoted_;
2616
2596 // Incremental marking steps counters. 2617 // Incremental marking steps counters.
2597 int steps_count_; 2618 int steps_count_;
2598 double steps_took_; 2619 double steps_took_;
2599 double longest_step_; 2620 double longest_step_;
2600 int steps_count_since_last_gc_; 2621 int steps_count_since_last_gc_;
2601 double steps_took_since_last_gc_; 2622 double steps_took_since_last_gc_;
2602 2623
2603 Heap* heap_; 2624 Heap* heap_;
2604 2625
2605 const char* gc_reason_; 2626 const char* gc_reason_;
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
2816 AssertNoAllocation no_alloc; // i.e. no gc allowed. 2837 AssertNoAllocation no_alloc; // i.e. no gc allowed.
2817 2838
2818 private: 2839 private:
2819 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2840 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2820 }; 2841 };
2821 #endif // DEBUG || LIVE_OBJECT_LIST 2842 #endif // DEBUG || LIVE_OBJECT_LIST
2822 2843
2823 } } // namespace v8::internal 2844 } } // namespace v8::internal
2824 2845
2825 #endif // V8_HEAP_H_ 2846 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/global-handles.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698