Skip to content

Commit

Permalink
Add image decoding TRACE_EVENTs to benchmark category for Telemetry perf
Browse files Browse the repository at this point in the history
A change in catapult will surface these timing data to rendering_metric:
https://chromium-review.googlesource.com/c/catapult/+/1600403

Bug: 944756
Change-Id: I7c446d9d83e312046cffc519c572570167f48c0e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1600836
Reviewed-by: Eric Karl <ericrk@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Madeleine Barowsky <mbarowsky@chromium.org>
Auto-Submit: Madeleine Barowsky <mbarowsky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658432}
  • Loading branch information
Madeleine Barowsky authored and Commit Bot committed May 10, 2019
1 parent 9f64710 commit f94c0a3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cc/tiles/gpu_image_decode_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1669,7 +1669,7 @@ void GpuImageDecodeCache::DecodeImageIfNecessary(const DrawImage& draw_image,
return;
}

TRACE_EVENT0("cc", "GpuImageDecodeCache::DecodeImage");
TRACE_EVENT0("cc,benchmark", "GpuImageDecodeCache::DecodeImage");
RecordImageMipLevelUMA(image_data->upload_scale_mip_level);

image_data->decode.ResetData();
Expand Down
4 changes: 2 additions & 2 deletions cc/tiles/software_image_decode_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ void SoftwareImageDecodeCache::UnrefImage(const CacheKey& key) {
void SoftwareImageDecodeCache::DecodeImageInTask(const CacheKey& key,
const PaintImage& paint_image,
DecodeTaskType task_type) {
TRACE_EVENT1("cc", "SoftwareImageDecodeCache::DecodeImageInTask", "key",
key.ToString());
TRACE_EVENT1("cc,benchmark", "SoftwareImageDecodeCache::DecodeImageInTask",
"key", key.ToString());
base::AutoLock lock(lock_);

auto image_it = decoded_images_.Peek(key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ bool ImageDecoderWrapper::Decode(ImageDecoderFactory* factory,
{
// This trace event is important since it is used by telemetry scripts to
// measure the decode time.
TRACE_EVENT0("blink", "ImageFrameGenerator::decode");
TRACE_EVENT0("blink,benchmark", "ImageFrameGenerator::decode");
frame = decoder->DecodeFrameBufferAtIndex(frame_index_);
}
// SetMemoryAllocator() can try to access decoder's data, so we have to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ bool ImageFrameGenerator::DecodeToYUV(SegmentReader* data,

{
// This is the YUV analog of ImageFrameGenerator::decode.
TRACE_EVENT0("blink", "ImageFrameGenerator::decodeToYUV");
TRACE_EVENT0("blink,benchmark", "ImageFrameGenerator::decodeToYUV");
decoder->DecodeToYUV();
}

Expand Down

0 comments on commit f94c0a3

Please sign in to comment.