diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-20 22:20:21 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-20 22:20:21 +0000 |
commit | e2043f22e11ef6969ee59f665b4fef113b60825d (patch) | |
tree | 8ace805b5ee37da033debb72260973f7442508d0 /chrome | |
parent | 59c4d5358e6092d82e59f967ef249ecb2526b3e0 (diff) | |
download | chromium_src-e2043f22e11ef6969ee59f665b4fef113b60825d.zip chromium_src-e2043f22e11ef6969ee59f665b4fef113b60825d.tar.gz chromium_src-e2043f22e11ef6969ee59f665b4fef113b60825d.tar.bz2 |
Add tracing for RLZ and ValueStoreFrontEnd
* ValueStoreFrontEnd has been showing up as a hotspot, log the file that's being read so we can narrow this down.
* Add tracing for RLZ subsystem so it's easier to see if it has any impact.
BUG=140784
TEST=None
TBR=mpcomplete@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11280050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168885 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/rlz/rlz.cc | 5 | ||||
-rw-r--r-- | chrome/browser/value_store/value_store_frontend.cc | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc index 3027a1a..7005e32 100644 --- a/chrome/browser/rlz/rlz.cc +++ b/chrome/browser/rlz/rlz.cc @@ -11,6 +11,7 @@ #include <algorithm> #include "base/bind.h" +#include "base/debug/trace_event.h" #include "base/message_loop.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" @@ -68,6 +69,7 @@ void RecordProductEvents(bool first_run, bool already_ran, bool omnibox_used, bool homepage_used) { + TRACE_EVENT0("RLZ", "RecordProductEvents"); // Record the installation of chrome. We call this all the time but the rlz // lib should ignore all but the first one. rlz_lib::RecordProductEvent(rlz_lib::CHROME, @@ -320,6 +322,7 @@ void RLZTracker::ScheduleFinancialPing() { } void RLZTracker::PingNowImpl() { + TRACE_EVENT0("RLZ", "RLZTracker::PingNowImpl"); string16 lang; GoogleUpdateSettings::GetLanguage(&lang); if (lang.empty()) @@ -460,6 +463,7 @@ bool RLZTracker::ScheduleRecordFirstSearch(rlz_lib::AccessPoint point) { // static std::string RLZTracker::GetAccessPointHttpHeader(rlz_lib::AccessPoint point) { + TRACE_EVENT0("RLZ", "RLZTracker::GetAccessPointHttpHeader"); std::string extra_headers; string16 rlz_string; RLZTracker::GetAccessPointRlz(point, &rlz_string); @@ -476,6 +480,7 @@ std::string RLZTracker::GetAccessPointHttpHeader(rlz_lib::AccessPoint point) { // a successful ping, then we update the cached value. bool RLZTracker::GetAccessPointRlz(rlz_lib::AccessPoint point, string16* rlz) { + TRACE_EVENT0("RLZ", "RLZTracker::GetAccessPointRlz"); return GetInstance()->GetAccessPointRlzImpl(point, rlz); } diff --git a/chrome/browser/value_store/value_store_frontend.cc b/chrome/browser/value_store/value_store_frontend.cc index e5918bd..0ad8493 100644 --- a/chrome/browser/value_store/value_store_frontend.cc +++ b/chrome/browser/value_store/value_store_frontend.cc @@ -4,6 +4,7 @@ #include "chrome/browser/value_store/value_store_frontend.h" +#include "base/debug/trace_event.h" #include "chrome/browser/value_store/leveldb_value_store.h" #include "content/public/browser/browser_thread.h" @@ -16,6 +17,8 @@ class ValueStoreFrontend::Backend : public base::RefCountedThreadSafe<Backend> { void Init(const FilePath& db_path) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); DCHECK(!storage_); + TRACE_EVENT1("ValueStoreFrontend::Backend", "Init", + "db_path", db_path.value().c_str()); storage_ = new LeveldbValueStore(db_path); } |