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

build: debug=1 -> "line-tables-only" #10029

Merged
merged 1 commit into from
May 27, 2023
Merged

build: debug=1 -> "line-tables-only" #10029

merged 1 commit into from
May 27, 2023

Conversation

xxchan
Copy link
Member

@xxchan xxchan commented May 26, 2023

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

close #9107

tested:

  • ci-dev 1.4G -> 764M (zstd compressed CI artifact 204M -> 130M)
  • release 1.3G -> 761M

Checklist For Contributors

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • I have demonstrated that backward compatibility is not broken by breaking changes and created issues to track deprecated features to be removed in the future. (Please refer to the issue)
  • All checks passed in ./risedev check (or alias, ./risedev c)

Checklist For Reviewers

  • I have requested macro/micro-benchmarks as this PR can affect performance substantially, and the results are shown.

Documentation

  • My PR DOES NOT contain user-facing changes.
Click here for Documentation

Types of user-facing changes

Please keep the types that apply to your changes, and remove the others.

  • Installation and deployment
  • Connector (sources & sinks)
  • SQL commands, functions, and operators
  • RisingWave cluster configuration changes
  • Other (please specify in the release note below)

Release note

@codecov
Copy link

codecov bot commented May 26, 2023

Codecov Report

Merging #10029 (3dc707c) into main (b3dc60a) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main   #10029      +/-   ##
==========================================
- Coverage   71.12%   71.12%   -0.01%     
==========================================
  Files        1229     1229              
  Lines      210162   210162              
==========================================
- Hits       149477   149473       -4     
- Misses      60685    60689       +4     
Flag Coverage Δ
rust 71.12% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 5 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@xxchan xxchan enabled auto-merge May 26, 2023 21:36
@xxchan xxchan disabled auto-merge May 26, 2023 21:37
@xxchan xxchan enabled auto-merge May 26, 2023 21:38
@xxchan xxchan disabled auto-merge May 26, 2023 21:38
@xxchan xxchan enabled auto-merge May 26, 2023 21:39
@xxchan xxchan disabled auto-merge May 26, 2023 21:40
@xxchan xxchan enabled auto-merge May 26, 2023 22:23
@xxchan xxchan disabled auto-merge May 26, 2023 22:23
@xxchan xxchan enabled auto-merge May 26, 2023 22:24
@xxchan xxchan added this pull request to the merge queue May 27, 2023
Merged via the queue into main with commit c1de99a May 27, 2023
@xxchan xxchan deleted the xxchan/clever-crocodile branch May 27, 2023 13:38
lmatz pushed a commit that referenced this pull request May 29, 2023
@fuyufjh
Copy link
Member

fuyufjh commented Jun 14, 2023

@xxchan

debug = "line-tables-only" caused heap profiling failed to print the crate & modular name of functions:

image

(⬆️ completely unreadable!)

As described in Rust docs:

  • line-tables-only: line tables only. Generates the minimal amount of debug info for backtraces with filename/line number info, but not anything else, i.e. no variable or function parameter info.

Perhaps the crate information is excluded as well :(

We may either 1) use different compile option for profiling and release, or, 2) always use the debug = 1 so that we are able to run profiling directly in users' cluster. I prefer the 2nd approach. What do you think?


In addition:

I tried to use --lines options of jeprof and it indeed can show filename and line numbers. But unluckly this cannot be used together with flamegraph (--collapsed --lines not work)

     0.0   0.0% 100.0%      0.5   0.0% push /home/ubuntu/risingwave/src/stream/src/cache/managed_lru.rs:180
     0.0   0.0% 100.0%      0.5   0.0% push_back /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/h2-0.3.18/src/proto/streams/buffer.rs:44
     0.0   0.0% 100.0%      1.0   0.0% push_front (inline) /rustc/f0411ffcebcd7f75ac02ed45feb53ffd07b75398/library/alloc/src/collections/vec_deque/mod.rs:1633
     0.0   0.0% 100.0%      1.0   0.0% push_internal_level (inline) /rustc/f0411ffcebcd7f75ac02ed45feb53ffd07b75398/library/alloc/src/collections/btree/node.rs:594
     0.0   0.0% 100.0%      8.7   0.0% put /home/ubuntu/.cargo/git/checkouts/lru-rs-b0d90f175c30fd68/cb2d7c7/src/lib.rs:311
     0.0   0.0% 100.0%      8.7   0.0% put /home/ubuntu/risingwave/src/stream/src/cache/managed_lru.rs:126

@xxchan
Copy link
Member Author

xxchan commented Jun 14, 2023

I will take a look

@xxchan
Copy link
Member Author

xxchan commented Jun 14, 2023

Agree to go back to debug = 1, although the decrease in binary size looks really cool 🥹. It doesn't matter that much now. BTW, I'm not sure what's the common practice for debuginfo in production.

@xxchan xxchan mentioned this pull request Jun 14, 2023
7 tasks
@fuyufjh
Copy link
Member

fuyufjh commented Jun 15, 2023

Agree to go back to debug = 1, although the decrease in binary size looks really cool 🥹. It doesn't matter that much now. BTW, I'm not sure what's the common practice for debuginfo in production.

As far as I know, C++ application usually keeps all debug information with binary, but Rust has so many options and I don't know which one to use as well.

But what I can say for sure is that our CI pipelines e.g. benchmark relies on release build. Our CI pipeline only distinguishes between release and debug, and we don't want to introduce another kind of build.

fuyufjh added a commit that referenced this pull request Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use debug=line-tables-only
3 participants