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

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

Issue 1841213003: Move CompilerStats from isolate to thread. Aggregate stats. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: review comments addressed Created 4 years, 8 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 | « no previous file | runtime/vm/atomic_android.h » ('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_ATOMIC_H_ 5 #ifndef VM_ATOMIC_H_
6 #define VM_ATOMIC_H_ 6 #define VM_ATOMIC_H_
7 7
8 #include "platform/globals.h" 8 #include "platform/globals.h"
9 9
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
11 #include "vm/simulator.h" 11 #include "vm/simulator.h"
12 12
13 namespace dart { 13 namespace dart {
14 14
15 class AtomicOperations : public AllStatic { 15 class AtomicOperations : public AllStatic {
16 public: 16 public:
17 // Atomically fetch the value at p and increment the value at p. 17 // Atomically fetch the value at p and increment the value at p.
18 // Returns the original value at p. 18 // Returns the original value at p.
19 // 19 //
20 // NOTE: Not to be used for any atomic operations involving memory locations 20 // NOTE: Not to be used for any atomic operations involving memory locations
21 // that are accessed by generated code. 21 // that are accessed by generated code.
22 static uintptr_t FetchAndIncrement(uintptr_t* p); 22 static uintptr_t FetchAndIncrement(uintptr_t* p);
23 23
24 // Atomically increment the value at p by 'value'. 24 // Atomically increment the value at p by 'value'.
25 // 25 //
26 // NOTE: Not to be used for any atomic operations involving memory locations 26 // NOTE: Not to be used for any atomic operations involving memory locations
27 // that are accessed by generated code. 27 // that are accessed by generated code.
28 static void IncrementBy(intptr_t* p, intptr_t value); 28 static void IncrementBy(intptr_t* p, intptr_t value);
29 static void IncrementInt64By(int64_t* p, int64_t value);
29 30
30 // Atomically fetch the value at p and decrement the value at p. 31 // Atomically fetch the value at p and decrement the value at p.
31 // Returns the original value at p. 32 // Returns the original value at p.
32 // 33 //
33 // NOTE: Not to be used for any atomic operations involving memory locations 34 // NOTE: Not to be used for any atomic operations involving memory locations
34 // that are accessed by generated code. 35 // that are accessed by generated code.
35 static uintptr_t FetchAndDecrement(uintptr_t* p); 36 static uintptr_t FetchAndDecrement(uintptr_t* p);
36 37
37 // Atomically decrement the value at p by 'value'. 38 // Atomically decrement the value at p by 'value'.
38 // 39 //
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 #include "vm/atomic_linux.h" 75 #include "vm/atomic_linux.h"
75 #elif defined(TARGET_OS_MACOS) 76 #elif defined(TARGET_OS_MACOS)
76 #include "vm/atomic_macos.h" 77 #include "vm/atomic_macos.h"
77 #elif defined(TARGET_OS_WINDOWS) 78 #elif defined(TARGET_OS_WINDOWS)
78 #include "vm/atomic_win.h" 79 #include "vm/atomic_win.h"
79 #else 80 #else
80 #error Unknown target os. 81 #error Unknown target os.
81 #endif 82 #endif
82 83
83 #endif // VM_ATOMIC_H_ 84 #endif // VM_ATOMIC_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/atomic_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698