| 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_LINUX) | 6 #if defined(TARGET_OS_LINUX) |
| 7 | 7 |
| 8 #include "vm/os.h" | 8 #include "vm/os.h" |
| 9 | 9 |
| 10 #include <errno.h> // NOLINT | 10 #include <errno.h> // NOLINT |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 return FLAG_generate_perf_events_symbols; | 150 return FLAG_generate_perf_events_symbols; |
| 151 } | 151 } |
| 152 | 152 |
| 153 virtual void Notify(const char* name, | 153 virtual void Notify(const char* name, |
| 154 uword base, | 154 uword base, |
| 155 uword prologue_offset, | 155 uword prologue_offset, |
| 156 uword size, | 156 uword size, |
| 157 bool optimized) { | 157 bool optimized) { |
| 158 Dart_FileWriteCallback file_write = Isolate::file_write_callback(); | 158 Dart_FileWriteCallback file_write = Isolate::file_write_callback(); |
| 159 ASSERT(file_write != NULL); | 159 ASSERT(file_write != NULL); |
| 160 const char* format = "%"Px" %"Px" %s%s\n"; | 160 const char* format = "%" Px " %" Px " %s%s\n"; |
| 161 const char* marker = optimized ? "*" : ""; | 161 const char* marker = optimized ? "*" : ""; |
| 162 intptr_t len = OS::SNPrint(NULL, 0, format, base, size, marker, name); | 162 intptr_t len = OS::SNPrint(NULL, 0, format, base, size, marker, name); |
| 163 char* buffer = Isolate::Current()->current_zone()->Alloc<char>(len + 1); | 163 char* buffer = Isolate::Current()->current_zone()->Alloc<char>(len + 1); |
| 164 OS::SNPrint(buffer, len + 1, format, base, size, marker, name); | 164 OS::SNPrint(buffer, len + 1, format, base, size, marker, name); |
| 165 ASSERT(out_file_ != NULL); | 165 ASSERT(out_file_ != NULL); |
| 166 (*file_write)(buffer, len, out_file_); | 166 (*file_write)(buffer, len, out_file_); |
| 167 } | 167 } |
| 168 | 168 |
| 169 private: | 169 private: |
| 170 void* out_file_; | 170 void* out_file_; |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 } | 520 } |
| 521 | 521 |
| 522 | 522 |
| 523 void OS::Exit(int code) { | 523 void OS::Exit(int code) { |
| 524 exit(code); | 524 exit(code); |
| 525 } | 525 } |
| 526 | 526 |
| 527 } // namespace dart | 527 } // namespace dart |
| 528 | 528 |
| 529 #endif // defined(TARGET_OS_LINUX) | 529 #endif // defined(TARGET_OS_LINUX) |
| OLD | NEW |