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

Improve OSS systrace #34252

Closed
wants to merge 5 commits into from
Closed

Conversation

janicduplessis
Copy link
Contributor

@janicduplessis janicduplessis commented Jul 23, 2022

Summary

Implements most of systrace using androidx.tracing, this makes it usable using Android Studio profiler systrace.

Changelog

[Android] [Added] - Improve OSS systrace

Test Plan

Run a systrace in Android Studio for RN Tester and make sure RN specific sections are there.

image

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. labels Jul 23, 2022
@react-native-bot react-native-bot added Platform: Android Android applications. Type: Enhancement A new feature or enhancement of an existing feature. labels Jul 23, 2022
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,826,618 +792
android hermes armeabi-v7a 7,217,918 +794
android hermes x86 8,138,958 +799
android hermes x86_64 8,117,094 +804
android jsc arm64-v8a 9,704,191 +624
android jsc armeabi-v7a 8,458,723 +638
android jsc x86 9,654,715 +621
android jsc x86_64 10,252,705 +634

Base commit: a67360b
Branch: main

@janicduplessis janicduplessis marked this pull request as ready for review July 23, 2022 06:33
public final class SystraceMessage {

private static final Builder NOOP_BUILDER = new NoopBuilder();
public static Boolean INCLUDE_ARGS = false;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding arguments to the section name makes grouping similar events a lot harder so by default I disable it. I don't really see how else args are useful for systrace in Android Studio. How is that used internally at facebook?

@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jul 23, 2022
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: a67360b
Branch: main

@facebook-github-bot
Copy link
Contributor

@dmitryrykun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@@ -24,6 +24,7 @@ PROGUARD_ANNOTATIONS_VERSION=1.19.0
ROBOLECTRIC_VERSION=4.4
SO_LOADER_VERSION=0.10.4
SWIPEREFRESH_LAYOUT_VERSION=1.0.0
ANDROIDX_TRACING_VERSION=1.1.0
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can we keep this sorted?

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @janicduplessis in ccbfdd7.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Jul 27, 2022
@janicduplessis janicduplessis deleted the systrace branch July 27, 2022 20:01
roryabraham pushed a commit to Expensify/react-native that referenced this pull request Aug 17, 2022
Summary:
Implements most of systrace using androidx.tracing, this makes it usable using Android Studio profiler systrace.

## Changelog

[Android] [Added] - Improve OSS systrace

Pull Request resolved: facebook#34252

Test Plan:
Run a systrace in Android Studio for RN Tester and make sure RN specific sections are there.

<img width="1263" alt="image" src="https://user-images.githubusercontent.com/2677334/180593493-fc087b4a-2253-43e1-b246-bed3e7bba7ac.png">

Reviewed By: NickGerleman

Differential Revision: D38116890

Pulled By: dmitryrykun

fbshipit-source-id: 744bedbf9ad4004488340a5b4e93d936d9a1e582
roryabraham pushed a commit to Expensify/react-native that referenced this pull request Aug 17, 2022
Summary:
Implements most of systrace using androidx.tracing, this makes it usable using Android Studio profiler systrace.

## Changelog

[Android] [Added] - Improve OSS systrace

Pull Request resolved: facebook#34252

Test Plan:
Run a systrace in Android Studio for RN Tester and make sure RN specific sections are there.

<img width="1263" alt="image" src="https://user-images.githubusercontent.com/2677334/180593493-fc087b4a-2253-43e1-b246-bed3e7bba7ac.png">

Reviewed By: NickGerleman

Differential Revision: D38116890

Pulled By: dmitryrykun

fbshipit-source-id: 744bedbf9ad4004488340a5b4e93d936d9a1e582
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. Merged This PR has been merged. Platform: Android Android applications. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. Type: Enhancement A new feature or enhancement of an existing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants