| OLD | NEW |
| 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 #include "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_OS_ANDROID) | 6 #if defined(TARGET_OS_ANDROID) |
| 7 | 7 |
| 8 #include "vm/os.h" | 8 #include "vm/os.h" |
| 9 | 9 |
| 10 #include <android/log.h> // NOLINT | 10 #include <android/log.h> // NOLINT |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 return FLAG_generate_perf_events_symbols; | 66 return FLAG_generate_perf_events_symbols; |
| 67 } | 67 } |
| 68 | 68 |
| 69 virtual void Notify(const char* name, | 69 virtual void Notify(const char* name, |
| 70 uword base, | 70 uword base, |
| 71 uword prologue_offset, | 71 uword prologue_offset, |
| 72 uword size, | 72 uword size, |
| 73 bool optimized) { | 73 bool optimized) { |
| 74 Dart_FileWriteCallback file_write = Isolate::file_write_callback(); | 74 Dart_FileWriteCallback file_write = Isolate::file_write_callback(); |
| 75 ASSERT(file_write != NULL); | 75 ASSERT(file_write != NULL); |
| 76 const char* format = "%"Px" %"Px" %s%s\n"; | 76 const char* format = "%" Px " %" Px " %s%s\n"; |
| 77 const char* marker = optimized ? "*" : ""; | 77 const char* marker = optimized ? "*" : ""; |
| 78 intptr_t len = OS::SNPrint(NULL, 0, format, base, size, marker, name); | 78 intptr_t len = OS::SNPrint(NULL, 0, format, base, size, marker, name); |
| 79 char* buffer = Isolate::Current()->current_zone()->Alloc<char>(len + 1); | 79 char* buffer = Isolate::Current()->current_zone()->Alloc<char>(len + 1); |
| 80 OS::SNPrint(buffer, len + 1, format, base, size, marker, name); | 80 OS::SNPrint(buffer, len + 1, format, base, size, marker, name); |
| 81 ASSERT(out_file_ != NULL); | 81 ASSERT(out_file_ != NULL); |
| 82 (*file_write)(buffer, len, out_file_); | 82 (*file_write)(buffer, len, out_file_); |
| 83 } | 83 } |
| 84 | 84 |
| 85 private: | 85 private: |
| 86 void* out_file_; | 86 void* out_file_; |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 } | 457 } |
| 458 | 458 |
| 459 | 459 |
| 460 void OS::Exit(int code) { | 460 void OS::Exit(int code) { |
| 461 exit(code); | 461 exit(code); |
| 462 } | 462 } |
| 463 | 463 |
| 464 } // namespace dart | 464 } // namespace dart |
| 465 | 465 |
| 466 #endif // defined(TARGET_OS_ANDROID) | 466 #endif // defined(TARGET_OS_ANDROID) |
| OLD | NEW |