Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@chinmaygarde
Copy link
Member

@chinmaygarde chinmaygarde commented Mar 12, 2019

This reverts commit bc90132 and fixes the issue discovered on Windows builds.

@chinmaygarde chinmaygarde changed the title Reland ""Add support for trace counters with variable arguments and instrument the raster cache." Reland "Add support for trace counters with variable arguments and instrument the raster cache." Mar 12, 2019
#define FML_TRACE_COUNTER(category_group, name, count) \
::fml::tracing::TraceCounter(category_group, name, count);
#define FML_TRACE_COUNTER(category_group, name, counter_id, arg1, ...) \
::fml::tracing::TraceCounter((category_group), (name), (counter_id), (arg1), \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't actually what I meant, but if it works, great.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seemed to work on Windows. What did you actually mean?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant that the way simulate variadic macros on platforms that don't support them is to do:

#define MACRO(args) (some_variadic_function args)

and then invoke it as:

MACRO((arg1, arg2, arg3, arg4));

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is that ... variadic?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can invoke the macro with any number of "arguments" and have them forward to an actual variadic function. It'd behave like a variadic macro except that you'd have to live with extra parentheses wherever it's used.

Copy link
Contributor

@liyuqian liyuqian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nits.

size_t picture_cache_bytes = 0;

for (const auto& item : layer_cache_) {
const auto dimensions = item.second.image.image_dimensions();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe count/separate the number of items that has an empty/nonempty image?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did want to get your clarification on this. Why do empty images take up raster cache entries?

Copy link
Member Author

@chinmaygarde chinmaygarde Mar 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But, if you think thats useful, we can certainly add that stuff to the trace.

Copy link
Contributor

@liyuqian liyuqian Mar 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's due to our old logic of only caching when the SkPicture is rasterized a few times:

https://github.com/flutter/engine/blob/master/flow/raster_cache.cc#L211

Before the threshold is met, we create an Entry which has an empty image, and keep incrementing access_count.

@tvolkert
Copy link
Contributor

@fkorotkov the build_ios test has been queued for a very long time (currently 1:18:20). Is this because we're out of compute credits, or is something else going on?

@chinmaygarde
Copy link
Member Author

Also, is there a way in the UI to check how long a presubmit spent in the queue? Once started, only the time taken to finish the job is shown which is only a part of the total turnaround time.

@fkorotkov
Copy link

@tvolkert there were some issues earlier today with virtualization API inconsistency which led to the very long queue. Cirrus has being catching up for a few hours now and still the queue is pretty long but you have enough credits so the builds are in front of the queue. I'm monitoring the situation. Sorry for the troubles. A fix was deployed which will prevent from this happening again when virtualization API will lag next time.

@chinmaygarde
Copy link
Member Author

Is there a status page for such outages I can bookmark before resorting to disabling bots?

@fkorotkov
Copy link

No proper status page (follow the issue for updates) but everything is reported on Twitter.

…nstrument the raster cache."

This reverts commit bc90132 and fixes the
discovered on Windows builds.
@chinmaygarde chinmaygarde merged commit 906d684 into flutter:master Mar 13, 2019
@chinmaygarde chinmaygarde deleted the reland_counters branch March 13, 2019 21:15
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 14, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 14, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 14, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 14, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 14, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 14, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 14, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 14, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 14, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 14, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 14, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 15, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 15, 2019
RBogie pushed a commit to RBogie/flutter-engine that referenced this pull request Apr 8, 2019
…nstrument the raster cache." (flutter#8145)

This reverts commit bc90132 and fixes the
discovered on Windows builds.
RBogie added a commit to RBogie/flutter-engine that referenced this pull request Apr 8, 2019
…ts and instrument the raster cache." (flutter#8145)"

This reverts commit d373aad.
RBogie added a commit to RBogie/flutter-engine that referenced this pull request Apr 8, 2019
…ts and instrument the raster cache." (flutter#8145)"

This reverts commit d373aad.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants