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

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

Issue 1180903010: Fix GCC warning in heap-profile-table.cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for the fix. Created 5 years, 6 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) 2006, Google Inc. 1 // Copyright (c) 2006, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 const DumpMarkedArgs& args) { 512 const DumpMarkedArgs& args) {
513 if (v->mark() != args.mark) 513 if (v->mark() != args.mark)
514 return; 514 return;
515 Bucket b; 515 Bucket b;
516 memset(&b, 0, sizeof(b)); 516 memset(&b, 0, sizeof(b));
517 b.allocs = 1; 517 b.allocs = 1;
518 b.alloc_size = v->bytes; 518 b.alloc_size = v->bytes;
519 b.depth = v->bucket()->depth; 519 b.depth = v->bucket()->depth;
520 b.stack = v->bucket()->stack; 520 b.stack = v->bucket()->stack;
521 char addr[16]; 521 char addr[16];
522 snprintf(addr, 16, "0x%08" PRIxPTR, ptr); 522 snprintf(addr, 16, "0x%08" PRIxPTR, reinterpret_cast<uintptr_t>(ptr));
523 char buf[1024]; 523 char buf[1024];
524 int len = UnparseBucket(b, buf, 0, sizeof(buf), addr, NULL); 524 int len = UnparseBucket(b, buf, 0, sizeof(buf), addr, NULL);
525 RawWrite(args.fd, buf, len); 525 RawWrite(args.fd, buf, len);
526 } 526 }
527 527
528 inline 528 inline
529 void HeapProfileTable::AllocationAddressesIterator( 529 void HeapProfileTable::AllocationAddressesIterator(
530 const void* ptr, 530 const void* ptr,
531 AllocValue* v, 531 AllocValue* v,
532 const AllocationAddressIteratorArgs& args) { 532 const AllocationAddressIteratorArgs& args) {
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 char* unused) { 745 char* unused) {
746 // Perhaps also log the allocation stack trace (unsymbolized) 746 // Perhaps also log the allocation stack trace (unsymbolized)
747 // on this line in case somebody finds it useful. 747 // on this line in case somebody finds it useful.
748 RAW_LOG(ERROR, "leaked %" PRIuS " byte object %p", v->bytes, ptr); 748 RAW_LOG(ERROR, "leaked %" PRIuS " byte object %p", v->bytes, ptr);
749 } 749 }
750 750
751 void HeapProfileTable::Snapshot::ReportIndividualObjects() { 751 void HeapProfileTable::Snapshot::ReportIndividualObjects() {
752 char unused; 752 char unused;
753 map_.Iterate(ReportObject, &unused); 753 map_.Iterate(ReportObject, &unused);
754 } 754 }
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