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

*: Support generating adhoc heap profiling in svg format #9273

Merged
merged 2 commits into from
Jul 31, 2024

Conversation

CalvinNeo
Copy link
Member

@CalvinNeo CalvinNeo commented Jul 31, 2024

What problem does this PR solve?

Issue Number: ref #9241 close #9250 ref #9320

Problem Summary:

What is changed and how it works?

Support generating adhoc heap profiling in svg format
  1. While prof.activate is set to true, calling prof.dump will dump a heap file.
  2. The heap file can be transformed into svg format with the help from jeprof.
  3. TiFlash Proxy(TiKV) will embed a jeprof.in into its own code.
  4. When /debug/pprof/heap?jeprof=true is called, a perl sub-process is started with perl /dev/stdin --show_byte ${tiflash_path} ${heap_file_path} --svg.
  5. perl will execute the embedded script, and print the transformed svg files in stdout.

NOTE

  1. jeprof.in is not released to user.
  2. On some deployments, there could be insufficient privilege, so the API could fail and return to user with detailed message.
  3. perl must be provided, otherwise the API could fail and return to user with detailed message.

img_v3_02da_f6173f4a-df20-43ee-848a-716ad768126g

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Support generating adhoc heap profiling in svg format
支持生成即席的 heap profiling 的 svg 图

Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/needs-linked-issue labels Jul 31, 2024
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jul 31, 2024
Copy link
Contributor

ti-chi-bot bot commented Jul 31, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JinheLin, Lloyd-Pottiger

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [JinheLin,Lloyd-Pottiger]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 31, 2024
Copy link
Contributor

ti-chi-bot bot commented Jul 31, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-07-31 07:56:10.61651139 +0000 UTC m=+342486.896559458: ☑️ agreed by Lloyd-Pottiger.
  • 2024-07-31 08:00:39.326903999 +0000 UTC m=+342755.606952088: ☑️ agreed by JinheLin.

@ti-chi-bot ti-chi-bot bot merged commit 1107e30 into pingcap:master Jul 31, 2024
5 checks passed
JaySon-Huang pushed a commit to JaySon-Huang/tiflash that referenced this pull request Aug 2, 2024
… (pingcap#252)

Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unstable unit test AsyncTasksTest.AsyncTasksCommon
3 participants