| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 #include "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_OS_FUCHSIA) | 6 #if defined(TARGET_OS_FUCHSIA) |
| 7 | 7 |
| 8 #include "vm/os.h" | 8 #include "vm/os.h" |
| 9 | 9 |
| 10 #include <magenta/syscalls.h> | 10 #include <magenta/syscalls.h> |
| 11 #include <magenta/types.h> | 11 #include <magenta/types.h> |
| 12 | 12 |
| 13 #include "platform/assert.h" | 13 #include "platform/assert.h" |
| 14 #include "vm/zone.h" | 14 #include "vm/zone.h" |
| 15 | 15 |
| 16 namespace dart { | 16 namespace dart { |
| 17 | 17 |
| 18 #ifndef PRODUCT |
| 19 |
| 20 DEFINE_FLAG(bool, generate_perf_events_symbols, false, |
| 21 "Generate events symbols for profiling with perf"); |
| 22 |
| 23 #endif // !PRODUCT |
| 24 |
| 18 const char* OS::Name() { | 25 const char* OS::Name() { |
| 19 return "fuchsia"; | 26 return "fuchsia"; |
| 20 } | 27 } |
| 21 | 28 |
| 22 | 29 |
| 23 intptr_t OS::ProcessId() { | 30 intptr_t OS::ProcessId() { |
| 24 UNIMPLEMENTED(); | 31 UNIMPLEMENTED(); |
| 25 return 0; | 32 return 0; |
| 26 } | 33 } |
| 27 | 34 |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 } | 239 } |
| 233 | 240 |
| 234 | 241 |
| 235 bool OS::StringToInt64(const char* str, int64_t* value) { | 242 bool OS::StringToInt64(const char* str, int64_t* value) { |
| 236 UNIMPLEMENTED(); | 243 UNIMPLEMENTED(); |
| 237 return false; | 244 return false; |
| 238 } | 245 } |
| 239 | 246 |
| 240 | 247 |
| 241 void OS::RegisterCodeObservers() { | 248 void OS::RegisterCodeObservers() { |
| 242 UNIMPLEMENTED(); | 249 #ifndef PRODUCT |
| 250 if (FLAG_generate_perf_events_symbols) { |
| 251 UNIMPLEMENTED(); |
| 252 } |
| 253 #endif // !PRODUCT |
| 243 } | 254 } |
| 244 | 255 |
| 245 | 256 |
| 246 void OS::PrintErr(const char* format, ...) { | 257 void OS::PrintErr(const char* format, ...) { |
| 247 va_list args; | 258 va_list args; |
| 248 va_start(args, format); | 259 va_start(args, format); |
| 249 VFPrint(stderr, format, args); | 260 VFPrint(stderr, format, args); |
| 250 va_end(args); | 261 va_end(args); |
| 251 } | 262 } |
| 252 | 263 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 270 } | 281 } |
| 271 | 282 |
| 272 | 283 |
| 273 void OS::Exit(int code) { | 284 void OS::Exit(int code) { |
| 274 UNIMPLEMENTED(); | 285 UNIMPLEMENTED(); |
| 275 } | 286 } |
| 276 | 287 |
| 277 } // namespace dart | 288 } // namespace dart |
| 278 | 289 |
| 279 #endif // defined(TARGET_OS_FUCHSIA) | 290 #endif // defined(TARGET_OS_FUCHSIA) |
| OLD | NEW |