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

Side by Side Diff: src/client/linux/microdump_writer/microdump_writer.cc

Issue 2006333002: Fixing an unused-variable warning in microdump_writer.cc (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Created 4 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) 2014, Google Inc. 1 // Copyright (c) 2014, 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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 497
498 size_t next = NextOrderedMapping(mappings, curr); 498 size_t next = NextOrderedMapping(mappings, curr);
499 if (next == std::numeric_limits<size_t>::max()) 499 if (next == std::numeric_limits<size_t>::max())
500 break; 500 break;
501 501
502 uintptr_t hole_lo = mappings[curr]->start_addr + mappings[curr]->size; 502 uintptr_t hole_lo = mappings[curr]->start_addr + mappings[curr]->size;
503 uintptr_t hole_hi = mappings[next]->start_addr; 503 uintptr_t hole_hi = mappings[next]->start_addr;
504 504
505 if (hole_hi > hole_lo) { 505 if (hole_hi > hole_lo) {
506 size_t hole_sz = hole_hi - hole_lo; 506 size_t hole_sz = hole_hi - hole_lo;
507 int log2_hole_sz = Log2Floor(hole_sz);
508 hole_sum += hole_sz; 507 hole_sum += hole_sz;
509 hole_max = std::max(hole_sz, hole_max); 508 hole_max = std::max(hole_sz, hole_max);
510 ++hole_cnt; 509 ++hole_cnt;
511 ++hole_histogram[Log2Floor(hole_sz)]; 510 ++hole_histogram[Log2Floor(hole_sz)];
512 } 511 }
513 curr = next; 512 curr = next;
514 } 513 }
515 514
516 uintptr_t hi_addr = mappings[curr]->start_addr + mappings[curr]->size; 515 uintptr_t hi_addr = mappings[curr]->start_addr + mappings[curr]->size;
517 516
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 dumper.set_crash_signal(context->siginfo.si_signo); 589 dumper.set_crash_signal(context->siginfo.si_signo);
591 dumper.set_crash_thread(context->tid); 590 dumper.set_crash_thread(context->tid);
592 } 591 }
593 MicrodumpWriter writer(context, mappings, microdump_extra_info, &dumper); 592 MicrodumpWriter writer(context, mappings, microdump_extra_info, &dumper);
594 if (!writer.Init()) 593 if (!writer.Init())
595 return false; 594 return false;
596 return writer.Dump(); 595 return writer.Dump();
597 } 596 }
598 597
599 } // namespace google_breakpad 598 } // namespace google_breakpad
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