-
Notifications
You must be signed in to change notification settings - Fork 225
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
Provide #[derive(MallocSizeOf)] that is actually working #291
Conversation
09dbe2a
to
04dcab4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing malloc_size.rs
means we essentially "fork" from the Servo version (we're at commit 5bdea7dc1c80790a852a3fb03edfb2b8fbd403dc).
That's not necessarily a problem but something we should be aware of (and clean up that code comment and maybe the readme?).
367e37d
to
a0b0db6
Compare
@dvdplm addressed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor nits and then there's the matter of testing #[ignore_malloc_size_of = …]
.
15b2f83
to
3319031
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Co-Authored-By: David <[email protected]>
Co-Authored-By: David <[email protected]>
5dd2fa6
to
d160bbf
Compare
@ordian @niklasad1 Hey guys can you also take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIR #[derive(MallocSizeOf)]
actually worked if we renamed parity-util-mem
to memory_size_of
(example), but I agree it is a hack.
bac130b
to
25bb7ee
Compare
Yeah, hacky, might bring some issues later |
Lgtm too, about the way to include external module (parity-util-mem) into the derive macro, I like the current substrate way of doing thing (since we got the derive macro in our code base we can probably use it now): https://github.com/paritytech/substrate/blob/20a9b15cdbed4bf962a4447e8bfb812f766f2fbc/frame/support/procedural/tools/src/lib.rs#L34 (I do not remember to well how it works but it is actually well tested on substrate). |
You mean #255? Yeah, it's possible to implement it now. |
* master: (27 commits) update parity-util-mem (#309) Update features and feature dependencies (#307) Use proper memory queries to rocksdb (#308) Draft version updates and changelog (#299) Use custom error type for `from_hex` (#305) Fix typo. (#303) kvdb: remove KeyValueDBHandler (#304) extract common kvdb tests into a crate (#301) Expose to_hex and from_hex from impl-serde (#302) Add a top level function to parity-util-mem (#298) I/O statistic for key-value databases (#294) use for_tuples (#300) Add memory extensions for LRUCache, hashbrown (#293) Add memory stats for kvdb-s (#292) Provide #[derive(MallocSizeOf)] that is actually working (#291) Move and extend impls for locking primitives (#290) Update uint README (#288) Update README.md (#287) [ci]: remove feature flags in virtual workspace (#289) Prepare releases (#286) ...
On top of #290