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

Fix some missing tracking hints #2058

Merged
merged 1 commit into from
Apr 17, 2024
Merged

Fix some missing tracking hints #2058

merged 1 commit into from
Apr 17, 2024

Conversation

addisoncrump
Copy link
Collaborator

Addresses some concerns following #1886.

@tokatoka tokatoka merged commit edcff38 into main Apr 17, 2024
26 of 78 checks passed
@tokatoka tokatoka deleted the missing-tracking-hints branch April 17, 2024 12:34
@@ -179,7 +179,7 @@ pub fn main() {
if let Some(dynamic_map_size) = executor.coverage_map_size() {
executor
.observers_mut()
.match_name_mut::<HitcountsMapObserver<StdMapObserver<'_, u8, false>>>("shared_mem")
.match_name_mut::<ExplicitTracking<HitcountsMapObserver<StdMapObserver<'_, u8, false>>, true, false>>("shared_mem")
Copy link
Member

Choose a reason for hiding this comment

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

Not necessarily beautiful :/ It's because this is a different type now, right? dang...

Copy link
Member

Choose a reason for hiding this comment

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

Did we make this harder to use instead of easier?

Copy link
Member

Choose a reason for hiding this comment

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

yes

Copy link
Member

Choose a reason for hiding this comment

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

it's ofcourse more complicated if we add more trait generics to everything when we already had enough of them. previously it was just two additional true false flag to the feedback

Copy link
Member

Choose a reason for hiding this comment

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

imo i don't think #1886 is worth the complexity if the purpose of it is just to elimitate that too true, false for mapfeedback

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

let obs_ref = edges_observer.make_reference();
...
executor
  .observers_mut()
  .match_name_by_ref("edges", obs_ref)
  .as_mut()
  .truncate(...);

Copy link
Member

Choose a reason for hiding this comment

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

ok looks good

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note that obs_ref is a ZST and won't affect runtime performance. This all gets elided.

Copy link
Member

Choose a reason for hiding this comment

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

let obs_ref = edges_observer.make_reference();
...
executor
  .observers_mut()
  .match_name_by_ref("edges", obs_ref)
  .as_mut()
  .truncate(...);

If this works it's a great solution! :)

Copy link
Member

Choose a reason for hiding this comment

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

Also, this was a side effect that I mentioned in the original pull request (i.e., wrapping types). I don't understand why this is now an issue if it was okay when I submitted the pull request.

In our defense, this part was missing in the pull request :P

addisoncrump added a commit that referenced this pull request Apr 17, 2024
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

3 participants