Skip to content

Switch from single Complete event to a pair of Async Nestable events#48906

Closed
hoxyq wants to merge 4 commits into
facebook:mainfrom
hoxyq:export-D68564754
Closed

Switch from single Complete event to a pair of Async Nestable events#48906
hoxyq wants to merge 4 commits into
facebook:mainfrom
hoxyq:export-D68564754

Conversation

@hoxyq
Copy link
Copy Markdown
Contributor

@hoxyq hoxyq commented Jan 23, 2025

Summary:

Changelog: [Internal]

It looks like on Chrome side, Complete events (ph="X") are only used for Renderer-related events.

For user-land events with duration (non-instant events), there is a set of supported types, which don't include "X".

Later, pair of such events will form a performance measure event.

Differential Revision: D68564754

hoxyq added 4 commits January 23, 2025 06:46
Summary:
# Changelog: [Internal]

This is the pre-requisite before adding a formatter for conversion from Hermes format-agnostic API for JavaScript samples to Trace Events.

This struct will probably be used a lot around this module and big enough for a separate header.

Differential Revision: D68104202
Summary:
Pull Request resolved: facebook#48795

# Changelog: [Internal]

Splitting `PerformanceTracer::stopTracingAndCollectEvents()` into 2 separate methods.

Once we add logic for starting and stopping tracing on `InstanceAgent`:
- We would need to stop tracing everywhere synchronously
- Populate data sources in `PerformanceTracer`, like JavaScript samples
- Collect all events from different data sources in one payload via `PerformanceTracer::collectEvents()`

Differential Revision: D68331485
Summary:
# Changelog: [Internal]

Adds optional `id` field to Trace Event spec. This field will be required once we are going to emit trace with real custom tracks.

For custom tracks, we would need to emit pair of trace events:
1. Begin Event with type `b`.
2. End Event with type `e`.

They are [matched](https://github.com/ChromeDevTools/devtools-frontend/blob/99a9104ae974f8caa63927e356800f6762cdbf25/front_end/models/trace/helpers/Trace.ts#L261-L294) by Chrome DevTools frontend by `id` and `name` fields.

Differential Revision: D68559862
Summary:
# Changelog: [Internal]

It looks like on `Chrome` side, Complete events (`ph="X"`) are only used for Renderer-related events.

For user-land events with duration (non-instant events), there is a [set of supported types](https://github.com/ChromeDevTools/devtools-frontend/blob/99a9104ae974f8caa63927e356800f6762cdbf25/front_end/models/trace/types/TraceEvents.ts#L62-L65), which don't include `"X"`.

Later, pair of such events will form a [performance measure event](https://github.com/ChromeDevTools/devtools-frontend/blob/99a9104ae974f8caa63927e356800f6762cdbf25/front_end/models/trace/types/TraceEvents.ts#L2256-L2258).

Differential Revision: D68564754
@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. p: Facebook Partner: Facebook Partner labels Jan 23, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D68564754

hoxyq added a commit to hoxyq/react-native that referenced this pull request Jan 24, 2025
…acebook#48906)

Summary:

# Changelog: [Internal]

It looks like on `Chrome` side, Complete events (`ph="X"`) are only used for Renderer-related events.

For user-land events with duration (non-instant events), there is a [set of supported types](https://github.com/ChromeDevTools/devtools-frontend/blob/99a9104ae974f8caa63927e356800f6762cdbf25/front_end/models/trace/types/TraceEvents.ts#L62-L65), which don't include `"X"`.

Later, pair of such events will form a [performance measure event](https://github.com/ChromeDevTools/devtools-frontend/blob/99a9104ae974f8caa63927e356800f6762cdbf25/front_end/models/trace/types/TraceEvents.ts#L2256-L2258).

Differential Revision: D68564754
hoxyq added a commit to hoxyq/react-native that referenced this pull request Jan 24, 2025
…le events (facebook#48906)

Summary:

# Changelog: [Internal]

It looks like on `Chrome` side, Complete events (`ph="X"`) are only used for Renderer-related events.

For user-land events with duration (non-instant events), there is a [set of supported types](https://github.com/ChromeDevTools/devtools-frontend/blob/99a9104ae974f8caa63927e356800f6762cdbf25/front_end/models/trace/types/TraceEvents.ts#L62-L65), which don't include `"X"`.

Later, pair of such events will form a [performance measure event](https://github.com/ChromeDevTools/devtools-frontend/blob/99a9104ae974f8caa63927e356800f6762cdbf25/front_end/models/trace/types/TraceEvents.ts#L2256-L2258).

Differential Revision: D68564754
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 4b7906b.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jan 24, 2025
@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @hoxyq in 4b7906b

When will my fix make it into a release? | How to file a pick request?

ghost pushed a commit to discord/react-native that referenced this pull request Jul 29, 2025
…acebook#48906)

Summary:
Pull Request resolved: facebook#48906

# Changelog: [Internal]

It looks like on `Chrome` side, Complete events (`ph="X"`) are only used for Renderer-related events.

For user-land events with duration (non-instant events), there is a [set of supported types](https://github.com/ChromeDevTools/devtools-frontend/blob/99a9104ae974f8caa63927e356800f6762cdbf25/front_end/models/trace/types/TraceEvents.ts#L62-L65), which don't include `"X"`.

Later, pair of such events will form a [performance measure event](https://github.com/ChromeDevTools/devtools-frontend/blob/99a9104ae974f8caa63927e356800f6762cdbf25/front_end/models/trace/types/TraceEvents.ts#L2256-L2258).

Reviewed By: huntie

Differential Revision: D68564754

fbshipit-source-id: dac87ab06c47925a70e03f43f0628364217a06a2
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. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants