Commit a0046208 authored by vadimt's avatar vadimt Committed by Commit bot

Instrumenting CopyData to analyze its slowing down

The previous CL moved the copy part from IO thread.
Now, in the worker thread, copying data 15ms on average, instead of the old 5ms in IO thread, which I want to investigate.
I want to separate possible slowness from the task wrapper (what if params are copied in an inefficient way?) from the slowness from the memcpy.

BUG=422489

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

Cr-Commit-Position: refs/heads/master@{#313306}
parent f3242919
......@@ -26,6 +26,10 @@ void CopyData(const scoped_refptr<IOBuffer>& buf,
int buf_size,
const scoped_refptr<base::RefCountedMemory>& data,
int64 data_offset) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422489 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION("422489 CopyData"));
memcpy(buf->data(), data->front() + data_offset, buf_size);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment