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

Unified Diff: content/gpu/gpu_info_collector_win.cc

Issue 10386185: Add trace events to measure GPU process startup timing and time to first present. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: content/gpu/gpu_info_collector_win.cc
===================================================================
--- content/gpu/gpu_info_collector_win.cc (revision 137679)
+++ content/gpu/gpu_info_collector_win.cc (working copy)
@@ -9,6 +9,7 @@
#include <setupapi.h>
#include "base/command_line.h"
+#include "base/debug/trace_event.h"
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/logging.h"
@@ -50,6 +51,8 @@
}
content::GpuPerformanceStats RetrieveGpuPerformanceStats() {
+ TRACE_EVENT0("gpu", "RetrieveGpuPerformanceStats");
+
// If the user re-runs the assessment without restarting, the COM API
// returns WINSAT_ASSESSMENT_STATE_NOT_AVAILABLE. Because of that and
// http://crbug.com/124325, read the assessment result files directly.
@@ -151,6 +154,8 @@
namespace gpu_info_collector {
bool CollectGraphicsInfo(content::GPUInfo* gpu_info) {
+ TRACE_EVENT0("gpu", "CollectGraphicsInfo");
+
DCHECK(gpu_info);
content::GpuPerformanceStats stats = RetrieveGpuPerformanceStats();
@@ -204,6 +209,8 @@
}
bool CollectPreliminaryGraphicsInfo(content::GPUInfo* gpu_info) {
+ TRACE_EVENT0("gpu", "CollectPreliminaryGraphicsInfo");
+
DCHECK(gpu_info);
bool rt = true;
@@ -216,6 +223,8 @@
}
bool CollectGraphicsInfoD3D(IDirect3D9* d3d, content::GPUInfo* gpu_info) {
+ TRACE_EVENT0("gpu", "CollectGraphicsInfoD3D");
+
DCHECK(d3d);
DCHECK(gpu_info);
@@ -246,6 +255,8 @@
}
bool CollectVideoCardInfo(content::GPUInfo* gpu_info) {
+ TRACE_EVENT0("gpu", "CollectVideoCardInfo");
+
DCHECK(gpu_info);
// nvd3d9wrap.dll is loaded into all processes when Optimus is enabled.
@@ -280,6 +291,8 @@
bool CollectDriverInfoD3D(const std::wstring& device_id,
content::GPUInfo* gpu_info) {
+ TRACE_EVENT0("gpu", "CollectDriverInfoD3D");
+
// create device info for the display device
HDEVINFO device_info = SetupDiGetClassDevsW(
NULL, device_id.c_str(), NULL,
@@ -353,6 +366,8 @@
}
bool CollectDriverInfoGL(content::GPUInfo* gpu_info) {
+ TRACE_EVENT0("gpu", "CollectDriverInfoGL");
+
DCHECK(gpu_info);
std::string gl_version_string = gpu_info->gl_version_string;

Powered by Google App Engine
This is Rietveld 408576698