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

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

Issue 11412106: Support VTune's JIT interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/code_observers.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) 2012, 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_CODE_OBSERVERS_H_
6 #define VM_CODE_OBSERVERS_H_
7
8 #include "vm/globals.h"
9
10 namespace dart {
11
12 // Object observing code creation events. Used by external profilers and
13 // debuggers to map address ranges to function names.
14 class CodeObserver {
15 public:
16 virtual ~CodeObserver() { }
17
18 // Returns true if this observer is active and should be notified
19 // about newly created code objects.
20 virtual bool IsActive() const = 0;
21
22 // Notify code observer about a newly created code object with the
23 // given properties.
24 virtual void Notify(const char* name,
25 uword base,
26 uword prologue_offset,
27 uword size,
28 bool optimized) = 0;
29 };
30
31
32 class CodeObservers {
33 public:
34 static void InitOnce();
35
36 static void Register(CodeObserver* observer);
37
38 // Notify all active code observers about a newly created code object.
39 static void NotifyAll(const char* name,
40 uword base,
41 uword prologue_offset,
42 uword size,
43 bool optimized);
44
45 // Returns true if there is at least one active code observer.
46 static bool AreActive();
47
48 private:
49 static intptr_t observers_length_;
50 static CodeObserver** observers_;
51 };
52
53
54 } // namespace dart
55
56 #endif // VM_CODE_OBSERVERS_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/code_observers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698