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

Side by Side Diff: src/string-stream.cc

Issue 12033007: Hide addresses in traced code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments. Created 7 years, 11 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 | « src/flag-definitions.h ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 break; 160 break;
161 } 161 }
162 case 'f': case 'g': case 'G': case 'e': case 'E': { 162 case 'f': case 'g': case 'G': case 'e': case 'E': {
163 double value = current.data_.u_double_; 163 double value = current.data_.u_double_;
164 EmbeddedVector<char, 28> formatted; 164 EmbeddedVector<char, 28> formatted;
165 OS::SNPrintF(formatted, temp.start(), value); 165 OS::SNPrintF(formatted, temp.start(), value);
166 Add(formatted.start()); 166 Add(formatted.start());
167 break; 167 break;
168 } 168 }
169 case 'p': { 169 case 'p': {
170 void* value = current.data_.u_pointer_; 170 if (!FLAG_hide_addresses_when_tracing) {
171 EmbeddedVector<char, 20> formatted; 171 void* value = current.data_.u_pointer_;
172 OS::SNPrintF(formatted, temp.start(), value); 172 EmbeddedVector<char, 20> formatted;
173 Add(formatted.start()); 173 OS::SNPrintF(formatted, temp.start(), value);
174 Add(formatted.start());
175 } else {
176 Add("0xXXXXXXXX");
177 }
174 break; 178 break;
175 } 179 }
176 default: 180 default:
177 UNREACHABLE(); 181 UNREACHABLE();
178 break; 182 break;
179 } 183 }
180 } 184 }
181 185
182 // Verify that the buffer is 0-terminated 186 // Verify that the buffer is 0-terminated
183 ASSERT(buffer_[length_] == '\0'); 187 ASSERT(buffer_[length_] == '\0');
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 587
584 // Only grow once to the maximum allowable size. 588 // Only grow once to the maximum allowable size.
585 char* NoAllocationStringAllocator::grow(unsigned* bytes) { 589 char* NoAllocationStringAllocator::grow(unsigned* bytes) {
586 ASSERT(size_ >= *bytes); 590 ASSERT(size_ >= *bytes);
587 *bytes = size_; 591 *bytes = size_;
588 return space_; 592 return space_;
589 } 593 }
590 594
591 595
592 } } // namespace v8::internal 596 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698