| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include <fcntl.h> | 5 #include <fcntl.h> |
| 6 #include <signal.h> | 6 #include <signal.h> |
| 7 #include <sys/types.h> | 7 #include <sys/types.h> |
| 8 #include <unistd.h> | 8 #include <unistd.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| 11 #include <cstring> | 11 #include <cstring> |
| 12 #include <fstream> | 12 #include <fstream> |
| 13 #include <iostream> | 13 #include <iostream> |
| 14 #include <limits> | 14 #include <limits> |
| 15 #include <string> | 15 #include <string> |
| 16 #include <utility> | 16 #include <utility> |
| 17 #include <vector> | 17 #include <vector> |
| 18 | 18 |
| 19 #include "base/base64.h" | 19 #include "base/base64.h" |
| 20 #include "base/basictypes.h" | 20 #include "base/basictypes.h" |
| 21 #include "base/bind.h" | 21 #include "base/bind.h" |
| 22 #include "base/callback_helpers.h" | 22 #include "base/callback_helpers.h" |
| 23 #include "base/containers/hash_tables.h" | 23 #include "base/containers/hash_tables.h" |
| 24 #include "base/file_util.h" | 24 #include "base/file_util.h" |
| 25 #include "base/logging.h" | 25 #include "base/logging.h" |
| 26 #include "base/memory/scoped_ptr.h" | |
| 27 #include "base/strings/string_number_conversions.h" | 26 #include "base/strings/string_number_conversions.h" |
| 28 #include "base/strings/string_piece.h" | |
| 29 #include "base/strings/string_split.h" | 27 #include "base/strings/string_split.h" |
| 30 #include "base/strings/stringprintf.h" | 28 #include "base/strings/stringprintf.h" |
| 31 | 29 |
| 32 const unsigned int kPageSize = getpagesize(); | 30 const unsigned int kPageSize = getpagesize(); |
| 33 | 31 |
| 34 namespace { | 32 namespace { |
| 35 | 33 |
| 36 class BitSet { | 34 class BitSet { |
| 37 public: | 35 public: |
| 38 void resize(size_t nbits) { | 36 void resize(size_t nbits) { |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 } | 512 } |
| 515 } | 513 } |
| 516 | 514 |
| 517 ClassifyPages(&processes_memory); | 515 ClassifyPages(&processes_memory); |
| 518 if (short_output) | 516 if (short_output) |
| 519 DumpProcessesMemoryMapsInShortFormat(processes_memory); | 517 DumpProcessesMemoryMapsInShortFormat(processes_memory); |
| 520 else | 518 else |
| 521 DumpProcessesMemoryMapsInExtendedFormat(processes_memory); | 519 DumpProcessesMemoryMapsInExtendedFormat(processes_memory); |
| 522 return EXIT_SUCCESS; | 520 return EXIT_SUCCESS; |
| 523 } | 521 } |
| OLD | NEW |