rust-lang / backtrace-rs

Backtraces in Rust
https://docs.rs/backtrace
Other
516 stars 237 forks source link

remove some instances of dead_code #619

Closed klensy closed 2 months ago

github-actions[bot] commented 2 months ago

Code size changes for a hello-world Rust program linked with libstd with backtrace:

On platform ubuntu-latest:

klensy commented 2 months ago

Code size changes for a hello-world Rust program linked with libstd with backtrace:

On platform ubuntu-latest:

* Original binary size: **362,912 B**

* Updated binary size: **362,920 B**

* Difference: **8 B** (0%)

Super weird results.

klensy commented 2 months ago

Anyway, second commit reduces Frame size (for non serde, which is used in std):

print-type-size type: `capture::Frame`: 40 bytes, alignment: 8 bytes
print-type-size     discriminant: 8 bytes
print-type-size     variant `Raw`: 32 bytes
print-type-size         field `.0`: 32 bytes
print-type-size     variant `Deserialized`: 32 bytes
print-type-size         field `.ip`: 8 bytes
print-type-size         field `.symbol_address`: 8 bytes
print-type-size         field `.module_base_address`: 16 bytes

print-type-size type: `capture::Frame`: 32 bytes, alignment: 8 bytes
print-type-size     variant `Raw`: 32 bytes
print-type-size         field `.0`: 32 bytes
workingjubilee commented 2 months ago

Thanks!

I'll take a reduction in the actual data structure size yeah, binary size doesn't matter much.