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

Side by Side Diff: runtime/vm/tags.h

Issue 2146713004: More changes to use #ifndef PRODUCT ... #endif explicitly instead of relying on compiler magic. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « runtime/vm/scavenger.cc ('k') | runtime/vm/tags.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 #ifndef VM_TAGS_H_ 5 #ifndef VM_TAGS_H_
6 #define VM_TAGS_H_ 6 #define VM_TAGS_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 92
93 class VMTagCounters { 93 class VMTagCounters {
94 public: 94 public:
95 VMTagCounters(); 95 VMTagCounters();
96 96
97 void Increment(uword tag); 97 void Increment(uword tag);
98 98
99 int64_t count(uword tag); 99 int64_t count(uword tag);
100 100
101 #ifndef PRODUCT
101 void PrintToJSONObject(JSONObject* obj); 102 void PrintToJSONObject(JSONObject* obj);
103 #endif // !PRODUCT
102 104
103 private: 105 private:
104 int64_t counters_[VMTag::kNumVMTags]; 106 int64_t counters_[VMTag::kNumVMTags];
105 }; 107 };
106 108
107 109
108 class UserTags : public AllStatic { 110 class UserTags : public AllStatic {
109 public: 111 public:
110 // UserTag id space: [kUserTagIdOffset, kUserTagIdOffset + kMaxUserTags). 112 // UserTag id space: [kUserTagIdOffset, kUserTagIdOffset + kMaxUserTags).
111 static const intptr_t kMaxUserTags = 256; 113 static const intptr_t kMaxUserTags = 256;
112 static const uword kUserTagIdOffset = 0x4096; 114 static const uword kUserTagIdOffset = 0x4096;
113 static const uword kDefaultUserTag = kUserTagIdOffset; 115 static const uword kDefaultUserTag = kUserTagIdOffset;
114 static const char* TagName(uword tag_id); 116 static const char* TagName(uword tag_id);
115 static bool IsUserTag(uword tag_id) { 117 static bool IsUserTag(uword tag_id) {
116 return (tag_id >= kUserTagIdOffset) && 118 return (tag_id >= kUserTagIdOffset) &&
117 (tag_id < kUserTagIdOffset + kMaxUserTags); 119 (tag_id < kUserTagIdOffset + kMaxUserTags);
118 } 120 }
119 }; 121 };
120 122
121 123
122 } // namespace dart 124 } // namespace dart
123 125
124 #endif // VM_TAGS_H_ 126 #endif // VM_TAGS_H_
OLDNEW
« no previous file with comments | « runtime/vm/scavenger.cc ('k') | runtime/vm/tags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698