| Index: content/browser/browser_shutdown_profile_dumper.cc
|
| diff --git a/content/browser/browser_shutdown_profile_dumper.cc b/content/browser/browser_shutdown_profile_dumper.cc
|
| index c2533a09604cbe7a5490d55758acc4844e4a3f99..6dbc60aa8ea81b0cc3d9d2d181c48f6ee8ae81bf 100644
|
| --- a/content/browser/browser_shutdown_profile_dumper.cc
|
| +++ b/content/browser/browser_shutdown_profile_dumper.cc
|
| @@ -18,6 +18,13 @@
|
|
|
| namespace content {
|
|
|
| +static size_t GetTraceBufferPercentFull() {
|
| + float unused;
|
| + size_t num_events;
|
| + base::debug::TraceLog::GetInstance()->GetBufferUsage(&unused, &num_events);
|
| + return num_events;
|
| +}
|
| +
|
| BrowserShutdownProfileDumper::BrowserShutdownProfileDumper(
|
| const base::FilePath& dump_file_name)
|
| : dump_file_name_(dump_file_name),
|
| @@ -34,9 +41,8 @@ void BrowserShutdownProfileDumper::WriteTracesToDisc() {
|
| // Since the tracer stops when the trace buffer is filled, we'd rather save
|
| // what we have than nothing since we might see from the amount of events
|
| // that caused the problem.
|
| - DVLOG(1) << "Flushing shutdown traces to disc. The buffer is %" <<
|
| - base::debug::TraceLog::GetInstance()->GetBufferPercentFull() <<
|
| - " full.";
|
| + DVLOG(1) << "Flushing shutdown traces to disc. The buffer is %"
|
| + << GetTraceBufferPercentFull() << " full.";
|
| DCHECK(!dump_file_);
|
| dump_file_ = base::OpenFile(dump_file_name_, "w+");
|
| if (!IsFileValid()) {
|
|
|