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

Side by Side Diff: src/d8.h

Issue 10702168: Add counters that automatically track object sizes and counts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Whitespace change Created 8 years, 5 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/d8.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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 61
62 // A set of counters and associated information. An instance of this 62 // A set of counters and associated information. An instance of this
63 // class is stored directly in the memory-mapped counters file if 63 // class is stored directly in the memory-mapped counters file if
64 // the --map-counters options is used 64 // the --map-counters options is used
65 class CounterCollection { 65 class CounterCollection {
66 public: 66 public:
67 CounterCollection(); 67 CounterCollection();
68 Counter* GetNextCounter(); 68 Counter* GetNextCounter();
69 private: 69 private:
70 static const unsigned kMaxCounters = 256; 70 static const unsigned kMaxCounters = 512;
71 uint32_t magic_number_; 71 uint32_t magic_number_;
72 uint32_t max_counters_; 72 uint32_t max_counters_;
73 uint32_t max_name_size_; 73 uint32_t max_name_size_;
74 uint32_t counters_in_use_; 74 uint32_t counters_in_use_;
75 Counter counters_[kMaxCounters]; 75 Counter counters_[kMaxCounters];
76 }; 76 };
77 77
78 78
79 class CounterMap { 79 class CounterMap {
80 public: 80 public:
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 ExternalArrayType type, 401 ExternalArrayType type,
402 int32_t element_size); 402 int32_t element_size);
403 static void ExternalArrayWeakCallback(Persistent<Value> object, void* data); 403 static void ExternalArrayWeakCallback(Persistent<Value> object, void* data);
404 }; 404 };
405 405
406 406
407 } // namespace v8 407 } // namespace v8
408 408
409 409
410 #endif // V8_D8_H_ 410 #endif // V8_D8_H_
OLDNEW
« no previous file with comments | « no previous file | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698