1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
From 11e48b29d00fdd714c3ff3f8ebe0d51a2c4ce61c Mon Sep 17 00:00:00 2001
From: Dongseong Hwang <dongseong.hwang@intel.com>
Date: Tue, 11 Jul 2017 17:20:06 +0000
Subject: [PATCH] ozone: drm: Remove the debug details when dmabuf mmap fails.
As we fixed mmap failure, remove the redundant crash reports.
The CL adding the info: crrev.com/2710183005
BUG=629521
Change-Id: I8de9f16a3fce4a42500fe9c5e2843615940e184e
Reviewed-on: https://chromium-review.googlesource.com/565805
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Dongseong Hwang <dongseong.hwang@intel.com>
Commit-Queue: Dongseong Hwang <dongseong.hwang@intel.com>
Cr-Commit-Position: refs/heads/master@{#485662}
---
chrome/common/crash_keys.cc | 5 -----
ui/gfx/linux/client_native_pixmap_dmabuf.cc | 28 +++-------------------------
2 files changed, 3 insertions(+), 30 deletions(-)
diff --git a/chrome/common/crash_keys.cc b/chrome/common/crash_keys.cc
index c4b563e0309b..2f1efe6f2334 100644
--- a/chrome/common/crash_keys.cc
+++ b/chrome/common/crash_keys.cc
@@ -153,11 +153,6 @@ size_t RegisterChromeCrashKeys() {
{kInputEventFilterSendFailure, kSmallSize},
#if defined(OS_CHROMEOS)
{kNumberOfUsers, kSmallSize},
- // Temporary for https://crbug.com/629521
- {"mmap_params", kSmallSize},
- {"buffer_size", kSmallSize},
- {"errno", kSmallSize},
- {"number_of_fds", kSmallSize},
#endif
#if defined(OS_MACOSX)
{mac::kFirstNSException, kMediumSize},
diff --git a/ui/gfx/linux/client_native_pixmap_dmabuf.cc b/ui/gfx/linux/client_native_pixmap_dmabuf.cc
index 4927daf3a61d..e532686a4f5b 100644
--- a/ui/gfx/linux/client_native_pixmap_dmabuf.cc
+++ b/ui/gfx/linux/client_native_pixmap_dmabuf.cc
@@ -11,11 +11,9 @@
#include <sys/mman.h>
#include <xf86drm.h>
-#include "base/debug/crash_logging.h"
#include "base/memory/ptr_util.h"
#include "base/posix/eintr_wrapper.h"
#include "base/process/memory.h"
-#include "base/process/process_metrics.h"
#include "base/strings/stringprintf.h"
#include "base/trace_event/trace_event.h"
@@ -87,36 +85,16 @@ ClientNativePixmapDmaBuf::ClientNativePixmapDmaBuf(
if (mmap_error == ENOMEM)
base::TerminateBecauseOutOfMemory(map_size);
- // TODO(dcastagna): Remove the following diagnostic information and the
- // associated crash keys once crbug.com/629521 is fixed.
bool fd_valid = fcntl(dmabuf_fd_.get(), F_GETFD) != -1 ||
logging::GetLastSystemErrorCode() != EBADF;
- int minor = -1;
- int major = -1;
- struct stat buf;
- if (!fstat(dmabuf_fd_.get(), &buf)) {
- minor = minor(buf.st_dev);
- major = major(buf.st_dev);
- }
-
std::string mmap_params = base::StringPrintf(
"(addr=nullptr, length=%zu, prot=(PROT_READ | PROT_WRITE), "
- "flags=MAP_SHARED, fd=%d[valid=%d, minor=%d, major=%d], offset=0)",
- map_size, dmabuf_fd_.get(), fd_valid, minor, major);
+ "flags=MAP_SHARED, fd=%d[valid=%d], offset=0)",
+ map_size, dmabuf_fd_.get(), fd_valid);
std::string errno_str = logging::SystemErrorCodeToString(mmap_error);
- std::unique_ptr<base::ProcessMetrics> process_metrics(
- base::ProcessMetrics::CreateCurrentProcessMetrics());
- std::string number_of_fds =
- base::StringPrintf("%d", process_metrics->GetOpenFdCount());
- base::debug::ScopedCrashKey params_crash_key("mmap_params", mmap_params);
- base::debug::ScopedCrashKey size_crash_key("buffer_size", size.ToString());
- base::debug::ScopedCrashKey errno_crash_key("errno", errno_str);
- base::debug::ScopedCrashKey number_of_fds_crash_key("number_of_fds",
- number_of_fds);
LOG(ERROR) << "Failed to mmap dmabuf; mmap_params: " << mmap_params
<< ", buffer_size: (" << size.ToString()
- << "), errno: " << errno_str
- << " , number_of_fds: " << number_of_fds;
+ << "), errno: " << errno_str;
LOG(ERROR) << "NativePixmapHandle:";
LOG(ERROR) << "Number of fds: " << handle.fds.size();
LOG(ERROR) << "Number of planes: " << handle.planes.size();
--
2.13.3
|