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

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

Issue 612133004: Write barrier audit: const raw_ptr() (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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 | « runtime/vm/raw_object_snapshot.cc ('k') | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/service.h" 5 #include "vm/service.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/globals.h" 8 #include "platform/globals.h"
9 9
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 2583 matching lines...) Expand 10 before | Expand all | Expand 10 after
2594 // TODO(koda): Rename these methods SetHostUint64, etc. 2594 // TODO(koda): Rename these methods SetHostUint64, etc.
2595 message.SetUint64(0, Utils::HostToBigEndian64(meta_bytes)); 2595 message.SetUint64(0, Utils::HostToBigEndian64(meta_bytes));
2596 offset += sizeof(uint64_t); 2596 offset += sizeof(uint64_t);
2597 { 2597 {
2598 NoGCScope no_gc; 2598 NoGCScope no_gc;
2599 meta.ToUTF8(static_cast<uint8_t*>(message.DataAddr(offset)), meta_bytes); 2599 meta.ToUTF8(static_cast<uint8_t*>(message.DataAddr(offset)), meta_bytes);
2600 offset += meta_bytes; 2600 offset += meta_bytes;
2601 } 2601 }
2602 // TODO(koda): It would be nice to avoid this copy (requires changes to 2602 // TODO(koda): It would be nice to avoid this copy (requires changes to
2603 // MessageWriter code). 2603 // MessageWriter code).
2604 memmove(message.DataAddr(offset), data, size); 2604 {
2605 offset += size; 2605 NoGCScope no_gc;
2606 memmove(message.DataAddr(offset), data, size);
2607 offset += size;
2608 }
2606 ASSERT(offset == total_bytes); 2609 ASSERT(offset == total_bytes);
2607 SendEvent(eventId, message); 2610 SendEvent(eventId, message);
2608 } 2611 }
2609 2612
2610 2613
2611 void Service::HandleGCEvent(GCEvent* event) { 2614 void Service::HandleGCEvent(GCEvent* event) {
2612 JSONStream js; 2615 JSONStream js;
2613 event->PrintJSON(&js); 2616 event->PrintJSON(&js);
2614 const String& message = String::Handle(String::New(js.ToCString())); 2617 const String& message = String::Handle(String::New(js.ToCString()));
2615 SendEvent(kEventFamilyGC, message); 2618 SendEvent(kEventFamilyGC, message);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
2713 while (current != NULL) { 2716 while (current != NULL) {
2714 if (strcmp(name, current->name()) == 0) { 2717 if (strcmp(name, current->name()) == 0) {
2715 return current; 2718 return current;
2716 } 2719 }
2717 current = current->next(); 2720 current = current->next();
2718 } 2721 }
2719 return NULL; 2722 return NULL;
2720 } 2723 }
2721 2724
2722 } // namespace dart 2725 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698