From e7227e550e7298f07bb6f5f96a39a1137054ebdd Mon Sep 17 00:00:00 2001 From: "teravest@chromium.org" Date: Thu, 31 Jul 2014 21:45:46 +0000 Subject: [PATCH] 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 --- components/nacl/renderer/ppb_nacl_private_impl.cc | 1 + ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc index b814a9a474d3..5c7b9f980b77 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 9e5e38c48a4e..c8d56c34bc93 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++) { -- 2.11.4.GIT