diff options
author | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-31 21:45:46 +0000 |
---|---|---|
committer | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-31 21:45:46 +0000 |
commit | e7227e550e7298f07bb6f5f96a39a1137054ebdd (patch) | |
tree | 58fbd05a3e2cb81b39740fd7677ff700c7c1de1e | |
parent | abb43f5550cb37eece1379eef8d1d19e86b49afe (diff) | |
download | chromium_src-e7227e550e7298f07bb6f5f96a39a1137054ebdd.zip chromium_src-e7227e550e7298f07bb6f5f96a39a1137054ebdd.tar.gz chromium_src-e7227e550e7298f07bb6f5f96a39a1137054ebdd.tar.bz2 |
Pepper: Move some histogram code out of plugin.
This is a tiny change that moves PNaCl cache hit histogram logic out of the
trusted plugin.
BUG=none
Review URL: https://codereview.chromium.org/423363003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286897 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | components/nacl/renderer/ppb_nacl_private_impl.cc | 1 | ||||
-rw-r--r-- | ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc | 7 |
2 files changed, 1 insertions, 7 deletions
diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc index b814a9a..5c7b9f9 100644 --- a/components/nacl/renderer/ppb_nacl_private_impl.cc +++ b/components/nacl/renderer/ppb_nacl_private_impl.cc @@ -1602,6 +1602,7 @@ class PexeDownloader : public blink::WebURLLoaderClient { virtual void didGetNexeFd(int32_t pp_error, bool cache_hit, PP_FileHandle file_handle) { + HistogramEnumerate("NaCl.Perf.PNaClCache.IsHit", cache_hit, 2); if (cache_hit) { stream_handler_->DidCacheHit(stream_handler_user_data_, file_handle); diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc index 9e5e38c..c8d56c3 100644 --- a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc +++ b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc @@ -52,11 +52,6 @@ void HistogramRatio(pp::UMAPrivate& uma, kRatioBuckets); } -void HistogramEnumerateTranslationCache(pp::UMAPrivate& uma, bool hit) { - uma.HistogramEnumeration("NaCl.Perf.PNaClCache.IsHit", - hit, 2); -} - nacl::string GetArchitectureAttributes(Plugin* plugin) { pp::Var attrs_var(pp::PASS_REF, plugin->nacl_interface()->GetCpuFeatureAttrs()); @@ -321,7 +316,6 @@ void PnaclCoordinator::OpenBitcodeStream() { } void PnaclCoordinator::BitcodeStreamCacheHit(PP_FileHandle handle) { - HistogramEnumerateTranslationCache(plugin_->uma_interface(), true); if (handle == PP_kInvalidFileHandle) { ReportNonPpapiError( PP_NACL_ERROR_PNACL_CREATE_TEMP, @@ -336,7 +330,6 @@ void PnaclCoordinator::BitcodeStreamCacheHit(PP_FileHandle handle) { } void PnaclCoordinator::BitcodeStreamCacheMiss(int64_t expected_pexe_size) { - HistogramEnumerateTranslationCache(plugin_->uma_interface(), false); expected_pexe_size_ = expected_pexe_size; for (int i = 0; i < split_module_count_; i++) { |