Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

started polling the gpu usage #18752

Merged
merged 4 commits into from
Jun 15, 2020
Merged

started polling the gpu usage #18752

merged 4 commits into from
Jun 15, 2020

Conversation

gaaclarke
Copy link
Member

Description

Started polling the GPU's usage percentage via IOKit in profile and debug builds.

Related Issues

flutter/flutter#58197

Tests

I added the following tests:

None, code relies on communicating with the kernel.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the contributor guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the C++, Objective-C, Java style guides for the engine.
  • I read the tree hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation.
  • All existing and new tests are passing.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change. If not, delete the remainder of this section.

@gaaclarke gaaclarke force-pushed the poll-gpu branch 4 times, most recently from d71895b to c915b19 Compare June 2, 2020 21:58
@gaaclarke gaaclarke marked this pull request as ready for review June 2, 2020 22:13
@auto-assign auto-assign bot requested a review from gw280 June 2, 2020 22:13
@gaaclarke gaaclarke requested review from iskakaushik and removed request for gw280 June 2, 2020 22:13
@@ -139,13 +139,18 @@ source_set("flutter_framework_source") {
public_configs = [ "//flutter:config" ]

libs = [
Copy link
Contributor

Choose a reason for hiding this comment

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

i'm surprised that out GN format presubmit doesn't account for these.

Copy link
Member Author

Choose a reason for hiding this comment

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

Same, that formatter is usually pretty strict!

@@ -0,0 +1,229 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

Has this file been copied from somewhere? If so could you add a comment pointing to the source or reference? Reading it seems like it's an accumulation of a bunch of IOKit headers into one file.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, added documentation.

Copy link
Contributor

Choose a reason for hiding this comment

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

How does copyright work when the header is an amalgamation of other (presumably copyrighted) headers?

return &object_;
}
T get() { return object_; }
void swap(T new_value) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this is more like reset.

Copy link
Member Author

Choose a reason for hiding this comment

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

good call, changed

@@ -28,9 +30,126 @@
}

namespace flutter {
namespace {

#if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG || \
Copy link
Contributor

Choose a reason for hiding this comment

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

Given how big this class is getting, consider moving this to gpu_profiler_metrics_ios.<h|mm>.

Copy link
Member Author

Choose a reason for hiding this comment

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

The file is 228 lines, shrug. If you feel strongly about it I can move it. It's an easy change, just takes time with our current system.

Copy link
Contributor

@iskakaushik iskakaushik left a comment

Choose a reason for hiding this comment

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

LGTM

@gaaclarke
Copy link
Member Author

converted to draft until the parent PRs are approved and land

@gaaclarke gaaclarke force-pushed the poll-gpu branch 2 times, most recently from bf5f6fd to 1000775 Compare June 15, 2020 16:43
@gaaclarke gaaclarke marked this pull request as ready for review June 15, 2020 17:34
@fluttergithubbot
Copy link
Contributor

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@gaaclarke
Copy link
Member Author

Landing on red. The Drone CI tasks have stalled out and the engine is red because of a GOMA issue on the windows build machine. The last PR just changed the name of 2 ios test methods.

engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 17, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 17, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 17, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 17, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 17, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 17, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 17, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 17, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 18, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 18, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 18, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 18, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 18, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 18, 2020
liyuqian added a commit to liyuqian/packages that referenced this pull request Oct 5, 2020
It's now replaced by flutter/engine#18752
liyuqian added a commit to flutter/packages that referenced this pull request Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants