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

Side by Side Diff: third_party/tcmalloc/chromium/src/deep-heap-profile.cc

Issue 14859006: Use PRIx64 instead of PRIxPTR for uint64 in deep-heap-profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: always PRIx64 Created 7 years, 7 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
« 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 Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // --- 5 // ---
6 // Author: Sainbayar Sukhbaatar 6 // Author: Sainbayar Sukhbaatar
7 // Dai Mikurube 7 // Dai Mikurube
8 // 8 //
9 9
10 #include "deep-heap-profile.h" 10 #include "deep-heap-profile.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 353
354 bool DeepHeapProfile::TextBuffer::AppendInt64(int64 v, int d) { 354 bool DeepHeapProfile::TextBuffer::AppendInt64(int64 v, int d) {
355 int appended; 355 int appended;
356 if (d == 0) 356 if (d == 0)
357 appended = snprintf(buffer_ + cursor_, size_ - cursor_, "%"PRId64, v); 357 appended = snprintf(buffer_ + cursor_, size_ - cursor_, "%"PRId64, v);
358 else 358 else
359 appended = snprintf(buffer_ + cursor_, size_ - cursor_, "%*"PRId64, d, v); 359 appended = snprintf(buffer_ + cursor_, size_ - cursor_, "%*"PRId64, d, v);
360 return ForwardCursor(appended); 360 return ForwardCursor(appended);
361 } 361 }
362 362
363 bool DeepHeapProfile::TextBuffer::AppendPtr(uint64 v, int d) { 363 bool DeepHeapProfile::TextBuffer::AppendPtr(uint64 v, int d) {
Jeffrey Yasskin 2013/05/10 00:52:08 Another possible fix would be to change this to ui
Dai Mikurube (NOT FULLTIME) 2013/05/10 09:45:53 Yeah, it might be better, but we decided to use ui
364 int appended; 364 int appended;
365 if (d == 0) 365 if (d == 0)
366 appended = snprintf(buffer_ + cursor_, size_ - cursor_, "%"PRIxPTR, v); 366 appended = snprintf(buffer_ + cursor_, size_ - cursor_, "%"PRIx64, v);
Jeffrey Yasskin 2013/05/10 00:52:08 We'll eventually, probably, need to add a space be
Dai Mikurube (NOT FULLTIME) 2013/05/10 09:45:53 Ok.
367 else 367 else
368 appended = snprintf(buffer_ + cursor_, size_ - cursor_, "%0*"PRIxPTR, d, v); 368 appended = snprintf(buffer_ + cursor_, size_ - cursor_, "%0*"PRIx64, d, v);
369 return ForwardCursor(appended); 369 return ForwardCursor(appended);
370 } 370 }
371 371
372 bool DeepHeapProfile::TextBuffer::ForwardCursor(int appended) { 372 bool DeepHeapProfile::TextBuffer::ForwardCursor(int appended) {
373 if (appended < 0 || appended >= size_ - cursor_) 373 if (appended < 0 || appended >= size_ - cursor_)
374 return false; 374 return false;
375 cursor_ += appended; 375 cursor_ += appended;
376 return true; 376 return true;
377 } 377 }
378 378
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 } 923 }
924 924
925 DeepHeapProfile::~DeepHeapProfile() { 925 DeepHeapProfile::~DeepHeapProfile() {
926 } 926 }
927 927
928 int DeepHeapProfile::FillOrderedProfile(char raw_buffer[], int buffer_size) { 928 int DeepHeapProfile::FillOrderedProfile(char raw_buffer[], int buffer_size) {
929 return heap_profile_->FillOrderedProfile(raw_buffer, buffer_size); 929 return heap_profile_->FillOrderedProfile(raw_buffer, buffer_size);
930 } 930 }
931 931
932 #endif // USE_DEEP_HEAP_PROFILE 932 #endif // USE_DEEP_HEAP_PROFILE
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