Skip to content

chore: merge rust & js loader & CPU Profiling together#10009

Merged
hardfist merged 9 commits intomainfrom
yj/merge-tracing-data
Apr 17, 2025
Merged

chore: merge rust & js loader & CPU Profiling together#10009
hardfist merged 9 commits intomainfrom
yj/merge-tracing-data

Conversation

@hardfist
Copy link
Copy Markdown
Contributor

@hardfist hardfist commented Apr 14, 2025

Summary

This is just a POC now but it seems we can take full power of perfetto and see CPU profiler and tracing together, thanks to @LalitMaganti great support for Node.js CPU Profiler in Perfetto in google/perfetto#1267.

  • after
    image

It's interesting to see that https://profiler.firefox.com/ also support show CPU profiler and trace together
image

Follow up

  • remove JS_CPU and logging support
  • remove oetl support

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 14, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit e908c0d
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/6800ac8c5d6f280008813b94

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Apr 14, 2025
@hardfist hardfist force-pushed the yj/merge-tracing-data branch from 151b59e to d2b1569 Compare April 14, 2025 03:27
@hardfist hardfist changed the title chore: merge rust & js loader chore: merge rust & js loader & CPU Profiling together Apr 14, 2025
@hardfist hardfist force-pushed the yj/merge-tracing-data branch 2 times, most recently from d158a2d to 9cbbc69 Compare April 16, 2025 11:30
@hardfist hardfist marked this pull request as ready for review April 16, 2025 11:36
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 16, 2025

CodSpeed Performance Report

Merging #10009 will not alter performance

Comparing yj/merge-tracing-data (e908c0d) with main (096b97a)

Summary

✅ 11 untouched benchmarks

@hardfist hardfist requested a review from Copilot April 16, 2025 14:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

packages/rspack/src/trace/index.ts:90

  • The current naive implementation for merging trace events assumes that the original trace file ends with a ']'. Consider validating the trace structure or adding error handling to ensure the resulting JSON remains valid.
const newTrace = originTrace.replace(/]$/, `${eventMsg}
]`);

@hardfist hardfist force-pushed the yj/merge-tracing-data branch from e57a906 to b1155be Compare April 16, 2025 14:40
@hardfist hardfist force-pushed the yj/merge-tracing-data branch from 8c54358 to 67097fa Compare April 17, 2025 06:51
@hardfist hardfist enabled auto-merge (squash) April 17, 2025 07:00
@hardfist hardfist requested a review from ahabhgk April 17, 2025 07:00
@hardfist hardfist merged commit 1b72919 into main Apr 17, 2025
27 checks passed
@hardfist hardfist deleted the yj/merge-tracing-data branch April 17, 2025 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants