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

Side by Side Diff: runtime/vm/object.cc

Issue 10918123: Fix format used to write information into /tmp/perf-<pid>.map. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 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/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 7383 matching lines...) Expand 10 before | Expand all | Expand 10 after
7394 Instructions& instrs = 7394 Instructions& instrs =
7395 Instructions::ZoneHandle(Instructions::New(assembler->CodeSize())); 7395 Instructions::ZoneHandle(Instructions::New(assembler->CodeSize()));
7396 7396
7397 // Copy the instructions into the instruction area and apply all fixups. 7397 // Copy the instructions into the instruction area and apply all fixups.
7398 // Embedded pointers are still in handles at this point. 7398 // Embedded pointers are still in handles at this point.
7399 MemoryRegion region(reinterpret_cast<void*>(instrs.EntryPoint()), 7399 MemoryRegion region(reinterpret_cast<void*>(instrs.EntryPoint()),
7400 instrs.size()); 7400 instrs.size());
7401 assembler->FinalizeInstructions(region); 7401 assembler->FinalizeInstructions(region);
7402 Dart_FileWriterFunction perf_events_writer = Dart::perf_events_writer(); 7402 Dart_FileWriterFunction perf_events_writer = Dart::perf_events_writer();
7403 if (perf_events_writer != NULL) { 7403 if (perf_events_writer != NULL) {
7404 const char* format = "%#"Px" %#"Px" %s\n"; 7404 const char* format = "%"Px" %"Px" %s\n";
7405 uword addr = instrs.EntryPoint(); 7405 uword addr = instrs.EntryPoint();
7406 uword size = instrs.size(); 7406 uword size = instrs.size();
7407 intptr_t len = OS::SNPrint(NULL, 0, format, addr, size, name); 7407 intptr_t len = OS::SNPrint(NULL, 0, format, addr, size, name);
7408 char* buffer = Isolate::Current()->current_zone()->Alloc<char>(len + 1); 7408 char* buffer = Isolate::Current()->current_zone()->Alloc<char>(len + 1);
7409 OS::SNPrint(buffer, len + 1, format, addr, size, name); 7409 OS::SNPrint(buffer, len + 1, format, addr, size, name);
7410 (*perf_events_writer)(buffer, len); 7410 (*perf_events_writer)(buffer, len);
7411 } 7411 }
7412 DebugInfo* pprof_symbol_generator = Dart::pprof_symbol_generator(); 7412 DebugInfo* pprof_symbol_generator = Dart::pprof_symbol_generator();
7413 if (pprof_symbol_generator != NULL) { 7413 if (pprof_symbol_generator != NULL) {
7414 ASSERT(strlen(name) != 0); 7414 ASSERT(strlen(name) != 0);
(...skipping 3999 matching lines...) Expand 10 before | Expand all | Expand 10 after
11414 } 11414 }
11415 return result.raw(); 11415 return result.raw();
11416 } 11416 }
11417 11417
11418 11418
11419 const char* WeakProperty::ToCString() const { 11419 const char* WeakProperty::ToCString() const {
11420 return "_WeakProperty"; 11420 return "_WeakProperty";
11421 } 11421 }
11422 11422
11423 } // namespace dart 11423 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698