| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 // A utility for printing the contents of a postmortem stability minidump. | 5 // A utility for printing the contents of a postmortem stability minidump. |
| 6 | 6 |
| 7 #include <windows.h> // NOLINT | 7 #include <windows.h> // NOLINT |
| 8 #include <dbghelp.h> | 8 #include <dbghelp.h> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 size_t indent_level, | 43 size_t indent_level, |
| 44 const browser_watcher::Activity& activity) { | 44 const browser_watcher::Activity& activity) { |
| 45 DCHECK(out); | 45 DCHECK(out); |
| 46 Indent(out, indent_level); | 46 Indent(out, indent_level); |
| 47 fprintf(out, "Activity\n"); | 47 fprintf(out, "Activity\n"); |
| 48 Indent(out, indent_level + 1); | 48 Indent(out, indent_level + 1); |
| 49 fprintf(out, "type: %d\n", activity.type()); | 49 fprintf(out, "type: %d\n", activity.type()); |
| 50 Indent(out, indent_level + 1); | 50 Indent(out, indent_level + 1); |
| 51 fprintf(out, "time: %lld\n", activity.time()); | 51 fprintf(out, "time: %lld\n", activity.time()); |
| 52 switch (activity.type()) { | 52 switch (activity.type()) { |
| 53 case browser_watcher::Activity::NONE: | 53 case browser_watcher::Activity::UNKNOWN: |
| 54 break; | 54 break; |
| 55 case browser_watcher::Activity::ACT_TASK_RUN: | 55 case browser_watcher::Activity::ACT_TASK_RUN: |
| 56 Indent(out, indent_level + 1); | 56 Indent(out, indent_level + 1); |
| 57 fprintf(out, "origin_address: %llx\n", activity.origin_address()); | 57 fprintf(out, "origin_address: %llx\n", activity.origin_address()); |
| 58 fprintf(out, "task_sequence_id: %lld\n", activity.task_sequence_id()); | 58 fprintf(out, "task_sequence_id: %lld\n", activity.task_sequence_id()); |
| 59 break; | 59 break; |
| 60 case browser_watcher::Activity::ACT_LOCK_ACQUIRE: | 60 case browser_watcher::Activity::ACT_LOCK_ACQUIRE: |
| 61 Indent(out, indent_level + 1); | 61 Indent(out, indent_level + 1); |
| 62 fprintf(out, "lock_address: %llx\n", activity.lock_address()); | 62 fprintf(out, "lock_address: %llx\n", activity.lock_address()); |
| 63 break; | 63 break; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 PrintReport(stdout, report); | 142 PrintReport(stdout, report); |
| 143 | 143 |
| 144 return 0; | 144 return 0; |
| 145 } | 145 } |
| 146 | 146 |
| 147 } // namespace | 147 } // namespace |
| 148 | 148 |
| 149 int main(int argc, char** argv) { | 149 int main(int argc, char** argv) { |
| 150 return Main(argc, argv); | 150 return Main(argc, argv); |
| 151 } | 151 } |
| OLD | NEW |