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

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

Issue 195733009: Basic tag infrastructure (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 | « runtime/vm/native_entry.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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 #ifndef VM_TAGS_H_
6 #define VM_TAGS_H_
7
8 #include "vm/allocation.h"
9
10 class Isolate;
11
12 namespace dart {
13
14 #define VM_TAG_LIST(V) \
15 V(VM) /* Catch all */ \
16 V(Compile) \
17 V(Script) \
18 V(GCNewSpace) \
19 V(GCOldSpace) \
20 V(RuntimeNative) \
21 V(Idle) \
22
23
24 class VMTag : public AllStatic {
25 public:
26 enum VMTagId {
27 kInvalidTagId = 0,
28 #define DEFINE_VM_TAG_ID(tag) \
29 k##tag##TagId,
30 VM_TAG_LIST(DEFINE_VM_TAG_ID)
31 #undef DEFINE_VM_TAG_KIND
32 kNumVMTags,
33 };
34
35 static const char* TagName(uword id);
36
37 private:
38 struct TagEntry {
39 const char* name;
40 uword id;
41 };
42 static TagEntry entries_[];
43 };
44
45 class VMTagScope : StackResource {
46 public:
47 VMTagScope(Isolate* isolate, uword tag);
48 ~VMTagScope();
49 private:
50 uword previous_tag_;
51
52 DISALLOW_ALLOCATION();
53 DISALLOW_IMPLICIT_CONSTRUCTORS(VMTagScope);
54 };
55
56 } // namespace dart
57
58 #endif // VM_TAGS_H_
OLDNEW
« no previous file with comments | « runtime/vm/native_entry.cc ('k') | runtime/vm/tags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698