Skip to content

Commit

Permalink
Adding instrumentation to locate the source of jankiness.
Browse files Browse the repository at this point in the history
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. 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=424359
TBR=pauljensen@chromium.org

Review URL: https://codereview.chromium.org/661113002

Cr-Commit-Position: refs/heads/master@{#300115}
  • Loading branch information
vadimt authored and Commit bot committed Oct 17, 2014
1 parent 4a73ea3 commit 176bcaf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions net/http/http_stream_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -368,13 +368,22 @@ void HttpStreamParser::OnIOComplete(int result) {
// The client callback can do anything, including destroying this class,
// so any pending callback must be issued after everything else is done.
if (result != ERR_IO_PENDING && !callback_.is_null()) {
// TODO(vadimt): Remove ScopedProfile below once crbug.com/424359 is fixed.
tracked_objects::ScopedProfile tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"424359 HttpStreamParser::OnIOComplete callback"));

CompletionCallback c = callback_;
callback_.Reset();
c.Run(result);
}
}

int HttpStreamParser::DoLoop(int result) {
// TODO(vadimt): Remove ScopedProfile below once crbug.com/424359 is fixed.
tracked_objects::ScopedProfile tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION("424359 HttpStreamParser::DoLoop"));

do {
DCHECK_NE(ERR_IO_PENDING, result);
DCHECK_NE(STATE_DONE, io_state_);
Expand Down

0 comments on commit 176bcaf

Please sign in to comment.