-
Notifications
You must be signed in to change notification settings - Fork 236
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
feat: add a feature to enable jemalloc profiling #1940
feat: add a feature to enable jemalloc profiling #1940
Conversation
yangby-cryptape
commented
Feb 12, 2020
•
edited
Loading
edited
- fix: fix a ci script which check redundant dependencies
- feat: run a memory tracker thread to record the memory statistics
- A thread will be started in background to monitor the whole process, and trace the memory.
- feat: add a feature to enable jemalloc profiling
- CKB Debugging (Document about this feature.)
2789832
to
5443ba7
Compare
5443ba7
to
5c34321
Compare
ef23b6d
to
8b6263a
Compare
I rebase this PR and push the last commit. |
24e278b
to
034d39f
Compare
034d39f
to
89356f3
Compare
The last force-pushed was a mistake. The last three force-pushed only updated two line:
|
heim-net is using a yanked version of hex. The v0.0.10 fixed this by locking the hex version to v0.4.0. |
89356f3
to
64f2529
Compare
2035: fix: remove unsupport configurations in Cargo.toml r=quake,driftluo a=yangby-cryptape ### The Issue Here is a potential issue which was introduced by #1940. - Since our `rust-toolchain` is still be `1.41.0`, there will be no errors or warnings when we build the project. (This is why #1940 was merged) https://github.com/nervosnetwork/ckb/blob/22829ae85db1643480bd810150f9619250aac92e/rust-toolchain#L1 - But if you update the `rust-toolchain` to `1.42.0`, when you build the whole project (just execute `make prod`), you will get two warnings: > warning: ckb/Cargo.toml: Found `feature = ...` in `target.'cfg(...)'.dependencies`. This key is not supported for selecting dependencies and will not work as expected. Use the [features] section instead: https://doc.rust-lang.org/cargo/reference/features.html > warning: ckb/Cargo.toml: Found `feature = ...` in `target.'cfg(...)'.dependencies`. This key is not supported for selecting dependencies and will not work as expected. Use the [features] section instead: https://doc.rust-lang.org/cargo/reference/features.html ~~Although I haven't found any evidences now, I still strongly suspect that it was related to our recent memory leak.~~ **After a lot of tests, I think this issue was not related to our recent memory leak.** But it's still a bug. ### My Solution I read a lot of issues about cargo in few weeks, I didn't find any official / standard solution to fix it, and I thought they wouldn't fix it in few months. (`build.rs` can't fix it, too) So, I use a complex and dirty way to fix it, just review the code, please. #### How can I prove my modification was valid? - Please check [this example](https://github.com/yangby-cryptape/rust-features-trials/tree/99455ef/features/example-1), I have run it under Debian Buster and Windows 10. - I have build various kinds of CKB with different features and check a lot logs of them under Debian Buster. ### A Very Important Note **If any features of a rust bindings (to c library) crate was changed, please do `cargo clean` before build the project.** Some C libraries wouldn't re-compile by cargo after features changed, for example, `jemalloc-sys`. Co-authored-by: Boyu Yang <[email protected]>
2035: fix: remove unsupport configurations in Cargo.toml r=quake,driftluo a=yangby-cryptape ### The Issue Here is a potential issue which was introduced by #1940. - Since our `rust-toolchain` is still be `1.41.0`, there will be no errors or warnings when we build the project. (This is why #1940 was merged) https://github.com/nervosnetwork/ckb/blob/22829ae85db1643480bd810150f9619250aac92e/rust-toolchain#L1 - But if you update the `rust-toolchain` to `1.42.0`, when you build the whole project (just execute `make prod`), you will get two warnings: > warning: ckb/Cargo.toml: Found `feature = ...` in `target.'cfg(...)'.dependencies`. This key is not supported for selecting dependencies and will not work as expected. Use the [features] section instead: https://doc.rust-lang.org/cargo/reference/features.html > warning: ckb/Cargo.toml: Found `feature = ...` in `target.'cfg(...)'.dependencies`. This key is not supported for selecting dependencies and will not work as expected. Use the [features] section instead: https://doc.rust-lang.org/cargo/reference/features.html ~~Although I haven't found any evidences now, I still strongly suspect that it was related to our recent memory leak.~~ **After a lot of tests, I think this issue was not related to our recent memory leak.** But it's still a bug. ### My Solution I read a lot of issues about cargo in few weeks, I didn't find any official / standard solution to fix it, and I thought they wouldn't fix it in few months. (`build.rs` can't fix it, too) So, I use a complex and dirty way to fix it, just review the code, please. #### How can I prove my modification was valid? - Please check [this example](https://github.com/yangby-cryptape/rust-features-trials/tree/99455ef/features/example-1), I have run it under Debian Buster and Windows 10. - I have build various kinds of CKB with different features and check a lot logs of them under Debian Buster. ### A Very Important Note **If any features of a rust bindings (to c library) crate was changed, please do `cargo clean` before build the project.** Some C libraries wouldn't re-compile by cargo after features changed, for example, `jemalloc-sys`. Co-authored-by: Boyu Yang <[email protected]>
2035: fix: remove unsupport configurations in Cargo.toml r=quake,driftluo a=yangby-cryptape ### The Issue Here is a potential issue which was introduced by #1940. - Since our `rust-toolchain` is still be `1.41.0`, there will be no errors or warnings when we build the project. (This is why #1940 was merged) https://github.com/nervosnetwork/ckb/blob/22829ae85db1643480bd810150f9619250aac92e/rust-toolchain#L1 - But if you update the `rust-toolchain` to `1.42.0`, when you build the whole project (just execute `make prod`), you will get two warnings: > warning: ckb/Cargo.toml: Found `feature = ...` in `target.'cfg(...)'.dependencies`. This key is not supported for selecting dependencies and will not work as expected. Use the [features] section instead: https://doc.rust-lang.org/cargo/reference/features.html > warning: ckb/Cargo.toml: Found `feature = ...` in `target.'cfg(...)'.dependencies`. This key is not supported for selecting dependencies and will not work as expected. Use the [features] section instead: https://doc.rust-lang.org/cargo/reference/features.html ~~Although I haven't found any evidences now, I still strongly suspect that it was related to our recent memory leak.~~ **After a lot of tests, I think this issue was not related to our recent memory leak.** But it's still a bug. ### My Solution I read a lot of issues about cargo in few weeks, I didn't find any official / standard solution to fix it, and I thought they wouldn't fix it in few months. (`build.rs` can't fix it, too) So, I use a complex and dirty way to fix it, just review the code, please. #### How can I prove my modification was valid? - Please check [this example](https://github.com/yangby-cryptape/rust-features-trials/tree/99455ef/features/example-1), I have run it under Debian Buster and Windows 10. - I have build various kinds of CKB with different features and check a lot logs of them under Debian Buster. ### A Very Important Note **If any features of a rust bindings (to c library) crate was changed, please do `cargo clean` before build the project.** Some C libraries wouldn't re-compile by cargo after features changed, for example, `jemalloc-sys`. Co-authored-by: Boyu Yang <[email protected]>
2035: fix: remove unsupport configurations in Cargo.toml r=quake,driftluo a=yangby-cryptape ### The Issue Here is a potential issue which was introduced by #1940. - Since our `rust-toolchain` is still be `1.41.0`, there will be no errors or warnings when we build the project. (This is why #1940 was merged) https://github.com/nervosnetwork/ckb/blob/22829ae85db1643480bd810150f9619250aac92e/rust-toolchain#L1 - But if you update the `rust-toolchain` to `1.42.0`, when you build the whole project (just execute `make prod`), you will get two warnings: > warning: ckb/Cargo.toml: Found `feature = ...` in `target.'cfg(...)'.dependencies`. This key is not supported for selecting dependencies and will not work as expected. Use the [features] section instead: https://doc.rust-lang.org/cargo/reference/features.html > warning: ckb/Cargo.toml: Found `feature = ...` in `target.'cfg(...)'.dependencies`. This key is not supported for selecting dependencies and will not work as expected. Use the [features] section instead: https://doc.rust-lang.org/cargo/reference/features.html ~~Although I haven't found any evidences now, I still strongly suspect that it was related to our recent memory leak.~~ **After a lot of tests, I think this issue was not related to our recent memory leak.** But it's still a bug. ### My Solution I read a lot of issues about cargo in few weeks, I didn't find any official / standard solution to fix it, and I thought they wouldn't fix it in few months. (`build.rs` can't fix it, too) So, I use a complex and dirty way to fix it, just review the code, please. #### How can I prove my modification was valid? - Please check [this example](https://github.com/yangby-cryptape/rust-features-trials/tree/99455ef/features/example-1), I have run it under Debian Buster and Windows 10. - I have build various kinds of CKB with different features and check a lot logs of them under Debian Buster. ### A Very Important Note **If any features of a rust bindings (to c library) crate was changed, please do `cargo clean` before build the project.** Some C libraries wouldn't re-compile by cargo after features changed, for example, `jemalloc-sys`. Co-authored-by: Boyu Yang <[email protected]> Co-authored-by: ian <[email protected]>
2035: fix: remove unsupport configurations in Cargo.toml r=doitian,TheWaWaR a=yangby-cryptape ### The Issue Here is a potential issue which was introduced by #1940. - Since our `rust-toolchain` is still be `1.41.0`, there will be no errors or warnings when we build the project. (This is why #1940 was merged) https://github.com/nervosnetwork/ckb/blob/22829ae85db1643480bd810150f9619250aac92e/rust-toolchain#L1 - But if you update the `rust-toolchain` to `1.42.0`, when you build the whole project (just execute `make prod`), you will get two warnings: > warning: ckb/Cargo.toml: Found `feature = ...` in `target.'cfg(...)'.dependencies`. This key is not supported for selecting dependencies and will not work as expected. Use the [features] section instead: https://doc.rust-lang.org/cargo/reference/features.html > warning: ckb/Cargo.toml: Found `feature = ...` in `target.'cfg(...)'.dependencies`. This key is not supported for selecting dependencies and will not work as expected. Use the [features] section instead: https://doc.rust-lang.org/cargo/reference/features.html ~~Although I haven't found any evidences now, I still strongly suspect that it was related to our recent memory leak.~~ **After a lot of tests, I think this issue was not related to our recent memory leak.** But it's still a bug. ### My Solution I read a lot of issues about cargo in few weeks, I didn't find any official / standard solution to fix it, and I thought they wouldn't fix it in few months. (`build.rs` can't fix it, too) So, I use a complex and dirty way to fix it, just review the code, please. #### How can I prove my modification was valid? - Please check [this example](https://github.com/yangby-cryptape/rust-features-trials/tree/99455ef/features/example-1), I have run it under Debian Buster and Windows 10. - I have build various kinds of CKB with different features and check a lot logs of them under Debian Buster. ### A Very Important Note **If any features of a rust bindings (to c library) crate was changed, please do `cargo clean` before build the project.** Some C libraries wouldn't re-compile by cargo after features changed, for example, `jemalloc-sys`. Co-authored-by: Boyu Yang <[email protected]>