summaryrefslogtreecommitdiffstats
path: root/net/ssl
diff options
context:
space:
mode:
authorvadimt <vadimt@chromium.org>2014-10-21 18:57:26 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-22 04:03:44 +0000
commitb0eda3b45fb71dbb87a9f526b06c9b9b21879b16 (patch)
tree178d9d2319d965ffd6972db0d56cc80c536d80e3 /net/ssl
parent5ea4ad8707a1be0cc3edfcf2eb70708f55e15e5d (diff)
downloadchromium_src-b0eda3b45fb71dbb87a9f526b06c9b9b21879b16.zip
chromium_src-b0eda3b45fb71dbb87a9f526b06c9b9b21879b16.tar.gz
chromium_src-b0eda3b45fb71dbb87a9f526b06c9b9b21879b16.tar.bz2
Adding instrumentation to locate the source of jankiness.
Mechanical change that adds instrumentation required to locate the source of jankiness (i.e. a long-running fragment of code executed as a part of the task that causes jank) in the code. See the bug for details on what kind of jank we are after. A number of similar CLs were landed, and none of them caused issues. They've helped to find and fix janky code. The code of the instrumentation is highly optimized and is not expected to affect performance. The code simply creates a diagnostic task which is identical to ones created by PostTask or IPC message handlers. Landing as TBR since this is a mechanical, safe and temporary change. BUG=425814 TBR=rdsmith@chromium.org Review URL: https://codereview.chromium.org/673513002 Cr-Commit-Position: refs/heads/master@{#300616}
Diffstat (limited to 'net/ssl')
-rw-r--r--net/ssl/default_channel_id_store.cc26
1 files changed, 26 insertions, 0 deletions
diff --git a/net/ssl/default_channel_id_store.cc b/net/ssl/default_channel_id_store.cc
index b71d7b3..60e06ed 100644
--- a/net/ssl/default_channel_id_store.cc
+++ b/net/ssl/default_channel_id_store.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram.h"
+#include "base/profiler/scoped_profile.h"
#include "net/base/net_errors.h"
namespace net {
@@ -61,6 +62,11 @@ DefaultChannelIDStore::GetChannelIDTask::~GetChannelIDTask() {
void DefaultChannelIDStore::GetChannelIDTask::Run(
DefaultChannelIDStore* store) {
+ // TODO(vadimt): Remove ScopedProfile below once crbug.com/425814 is fixed.
+ tracked_objects::ScopedProfile tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "425814 DefaultChannelIDStore::GetChannelIDTask::Run"));
+
base::Time expiration_time;
std::string private_key_result;
std::string cert_result;
@@ -112,6 +118,11 @@ DefaultChannelIDStore::SetChannelIDTask::~SetChannelIDTask() {
void DefaultChannelIDStore::SetChannelIDTask::Run(
DefaultChannelIDStore* store) {
+ // TODO(vadimt): Remove ScopedProfile below once crbug.com/425814 is fixed.
+ tracked_objects::ScopedProfile tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "425814 DefaultChannelIDStore::SetChannelIDTask::Run"));
+
store->SyncSetChannelID(server_identifier_, creation_time_,
expiration_time_, private_key_, cert_);
}
@@ -145,6 +156,11 @@ DefaultChannelIDStore::DeleteChannelIDTask::
void DefaultChannelIDStore::DeleteChannelIDTask::Run(
DefaultChannelIDStore* store) {
+ // TODO(vadimt): Remove ScopedProfile below once crbug.com/425814 is fixed.
+ tracked_objects::ScopedProfile tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "425814 DefaultChannelIDStore::DeleteChannelIDTask::Run"));
+
store->SyncDeleteChannelID(server_identifier_);
InvokeCallback(callback_);
@@ -183,6 +199,11 @@ DefaultChannelIDStore::DeleteAllCreatedBetweenTask::
void DefaultChannelIDStore::DeleteAllCreatedBetweenTask::Run(
DefaultChannelIDStore* store) {
+ // TODO(vadimt): Remove ScopedProfile below once crbug.com/425814 is fixed.
+ tracked_objects::ScopedProfile tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "425814 DefaultChannelIDStore::DeleteAllCreatedBetweenTask::Run"));
+
store->SyncDeleteAllCreatedBetween(delete_begin_, delete_end_);
InvokeCallback(callback_);
@@ -213,6 +234,11 @@ DefaultChannelIDStore::GetAllChannelIDsTask::
void DefaultChannelIDStore::GetAllChannelIDsTask::Run(
DefaultChannelIDStore* store) {
+ // TODO(vadimt): Remove ScopedProfile below once crbug.com/425814 is fixed.
+ tracked_objects::ScopedProfile tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "425814 DefaultChannelIDStore::GetAllChannelIDsTask::Run"));
+
ChannelIDList cert_list;
store->SyncGetAllChannelIDs(&cert_list);