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

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

Issue 1274663004: Enable native stack walking for allocation profiling (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 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 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_GLOBALS_H_ 5 #ifndef VM_GLOBALS_H_
6 #define VM_GLOBALS_H_ 6 #define VM_GLOBALS_H_
7 7
8 // This file contains global definitions for the VM library only. Anything that 8 // This file contains global definitions for the VM library only. Anything that
9 // is more globally useful should be added to 'vm/globals.h'. 9 // is more globally useful should be added to 'vm/globals.h'.
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 84
85 // Zap value used to indicate uninitialized handle area (debug purposes). 85 // Zap value used to indicate uninitialized handle area (debug purposes).
86 #if defined(ARCH_IS_32_BIT) 86 #if defined(ARCH_IS_32_BIT)
87 static const uword kZapUninitializedWord = 0xabababab; 87 static const uword kZapUninitializedWord = 0xabababab;
88 #else 88 #else
89 static const uword kZapUninitializedWord = 0xabababababababab; 89 static const uword kZapUninitializedWord = 0xabababababababab;
90 #endif 90 #endif
91 91
92 92
93 // Macros to get the contents of sp and fp registers.
94 #if defined(TARGET_OS_WINDOWS)
95
96 #if defined(TARGET_ARCH_IA32)
97 #define COPY_SP_REGISTER(sp) UNIMPLEMENTED();
98 #define COPY_FP_REGISTER(fp) UNIMPLEMENTED();
99 #elif defined(TARGET_ARCH_X64)
100 #define COPY_SP_REGISTER(sp) UNIMPLEMENTED();
101 #define COPY_FP_REGISTER(fp) UNIMPLEMENTED();
102 #else
103 #error Unknown target architecture.
104 #endif
105
106 #else // !defined(TARGET_OS_WINDOWS))
107
108 // Assume GCC-like inline syntax is valid.
109 #if defined(TARGET_ARCH_IA32)
110 #define COPY_SP_REGISTER(sp) asm volatile ("movl %%esp, %0" : "=r" (sp) );
111 #define COPY_FP_REGISTER(fp) asm volatile ("movl %%ebp, %0" : "=r" (fp) );
112 #elif defined(TARGET_ARCH_X64)
113 #define COPY_SP_REGISTER(sp) asm volatile ("movq %%rsp, %0" : "=r" (sp) );
114 #define COPY_FP_REGISTER(fp) asm volatile ("movq %%rbp, %0" : "=r" (fp) );
115 #elif defined(TARGET_ARCH_ARM)
116 #define COPY_SP_REGISTER(sp) UNIMPLEMENTED();
117 #define COPY_FP_REGISTER(fp) UNIMPLEMENTED();
118 #elif defined(TARGET_ARCH_ARM64)
119 #define COPY_SP_REGISTER(sp) UNIMPLEMENTED();
120 #define COPY_FP_REGISTER(fp) UNIMPLEMENTED();
121 #elif defined(TARGET_ARCH_MIPS)
122 #define COPY_SP_REGISTER(sp) UNIMPLEMENTED();
123 #define COPY_FP_REGISTER(fp) UNIMPLEMENTED();
124 #else
125 #error Unknown target architecture.
126 #endif
127
128
129 #endif // !defined(TARGET_OS_WINDOWS))
130
93 } // namespace dart 131 } // namespace dart
94 132
95 #endif // VM_GLOBALS_H_ 133 #endif // VM_GLOBALS_H_
OLDNEW
« no previous file with comments | « runtime/bin/bin.gypi ('k') | runtime/vm/profiler.cc » ('j') | runtime/vm/profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698