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

Side by Side Diff: src/heap.h

Issue 9316060: Extend --trace-gc to output amount of memory reserved for V8 heap. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 2427 matching lines...) Expand 10 before | Expand all | Expand 10 after
2438 2438
2439 private: 2439 private:
2440 // Returns a string matching the collector. 2440 // Returns a string matching the collector.
2441 const char* CollectorString(); 2441 const char* CollectorString();
2442 2442
2443 // Returns size of object in heap (in MB). 2443 // Returns size of object in heap (in MB).
2444 double SizeOfHeapObjects() { 2444 double SizeOfHeapObjects() {
2445 return (static_cast<double>(HEAP->SizeOfObjects())) / MB; 2445 return (static_cast<double>(HEAP->SizeOfObjects())) / MB;
2446 } 2446 }
2447 2447
2448 double start_time_; // Timestamp set in the constructor. 2448 // Timestamp set in the constructor.
2449 intptr_t start_size_; // Size of objects in heap set in constructor. 2449 double start_time_;
2450 GarbageCollector collector_; // Type of collector. 2450
2451 // Size of objects in heap set in constructor.
2452 intptr_t start_object_size_;
2453
2454 // Size of memory allocated from OS set in constructor.
2455 intptr_t start_memory_size_;
2456
2457 // Type of collector.
2458 GarbageCollector collector_;
2451 2459
2452 // A count (including this one, e.g. the first collection is 1) of the 2460 // A count (including this one, e.g. the first collection is 1) of the
2453 // number of garbage collections. 2461 // number of garbage collections.
2454 unsigned int gc_count_; 2462 unsigned int gc_count_;
2455 2463
2456 // A count (including this one) of the number of full garbage collections. 2464 // A count (including this one) of the number of full garbage collections.
2457 int full_gc_count_; 2465 int full_gc_count_;
2458 2466
2459 // Amounts of time spent in different scopes during GC. 2467 // Amounts of time spent in different scopes during GC.
2460 double scopes_[Scope::kNumberOfScopes]; 2468 double scopes_[Scope::kNumberOfScopes];
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
2689 private: 2697 private:
2690 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2698 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2691 }; 2699 };
2692 #endif // DEBUG || LIVE_OBJECT_LIST 2700 #endif // DEBUG || LIVE_OBJECT_LIST
2693 2701
2694 } } // namespace v8::internal 2702 } } // namespace v8::internal
2695 2703
2696 #undef HEAP 2704 #undef HEAP
2697 2705
2698 #endif // V8_HEAP_H_ 2706 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698