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

ref(symcache): Switch to error with kind #296

Merged
merged 5 commits into from
Nov 30, 2020
Merged

Conversation

jan-auer
Copy link
Member

Follows the conventions set by std::io::Error.

@jan-auer jan-auer requested review from Swatinem and a team November 30, 2020 11:00
@jan-auer jan-auer self-assigned this Nov 30, 2020
symbolic-symcache/src/cache.rs Outdated Show resolved Hide resolved
symbolic-symcache/src/error.rs Show resolved Hide resolved
symbolic-symcache/src/format.rs Outdated Show resolved Hide resolved
symbolic-symcache/src/writer.rs Outdated Show resolved Hide resolved
Comment on lines +93 to +96
pub struct SymCacheError {
kind: SymCacheErrorKind,
#[source]
source: Option<Box<dyn Error + Send + Sync + 'static>>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::io::Error basically does double-boxing, which means that sizeof is one pointer, whereas we are 2 pointers big because of alignment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline that this would indeed make the happy-path more efficient, but at the expense of more code. In this case, we conclude to keep the code base simpler.

@jan-auer jan-auer merged commit 95a03da into master Nov 30, 2020
@jan-auer jan-auer deleted the ref/symcache-error branch November 30, 2020 12:24
jan-auer added a commit that referenced this pull request Nov 30, 2020
* master:
  ref(minidump): Switch to error with kind (#298)
  ref(unreal): Switch to error with kind (#297)
  ref(symcache): Switch to error with kind (#296)
jan-auer added a commit that referenced this pull request Dec 22, 2020
* master: (21 commits)
  fix: New nightly clippy lint (#295)
  fix(release): Do not publish examples to crates.io
  release: 8.0.0
  ref(debuginfo): Remove re-exports of error types (#300)
  meta: Update changelog
  ref(debuginfo): Switch to error with kind (#299)
  ref(minidump): Switch to error with kind (#298)
  ref(unreal): Switch to error with kind (#297)
  ref(symcache): Switch to error with kind (#296)
  feat: Rename architecture to wasm32 (#294)
  fix(debuginfo): Prefer DWARF names for Dart functions (#293)
  fix: clippy (#292)
  hack(dwarf): Skip line program sequences at 0 (#291)
  feat(wasm): support for wasm (#166)
  ci: Run rust nighlty on a schedule (#289)
  ref: Updates for rust 1.48 (#288)
  fix(debuginfo): Update dmsort to 1.0.1 to avoid panic due to UB (#287)
  ci: Use GHA instead of zeus (#286)
  ref: Introduce explicit NameMangling and better DemangleOptions (#275)
  meta: Bump all semver-major dependencies (#283)
  ...
jan-auer added a commit that referenced this pull request Dec 23, 2020
* master:
  fix: Update breakpad to version which fixes debug_id (#281)
  fix(pytest): Pin pytest 5 for debugfail customizations (#305)
  fix: New nightly clippy lint (#295)
  fix(release): Do not publish examples to crates.io
  release: 8.0.0
  ref(debuginfo): Remove re-exports of error types (#300)
  meta: Update changelog
  ref(debuginfo): Switch to error with kind (#299)
  ref(minidump): Switch to error with kind (#298)
  ref(unreal): Switch to error with kind (#297)
  ref(symcache): Switch to error with kind (#296)
  feat: Rename architecture to wasm32 (#294)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants