Skip to content

{start,stop}_sampling has a different semantics in unix and windows #166

Open

Description

@antocuni

I just noticed by looking at the implementation: on unix, we use a counter, while on windows it's a simple boolean. This means that this code behave differently:

_vmprof.stop_sampling()
_vmprof.stop_sampling()
_vmprof.start_sampling()

on widows, it will restart to take samples, while on unix it won't. I propose to tweak the windows implementation to behave like the unix one, to prevent subtle bugs and/or different behaviors.

Activity

  1. planrich commented on Nov 29, 2017

    @planrich
    Contributor

    Yep, I agree. Specifically this is about vmprof_ignore_signals which behaves differently. The reason for being a counter on linux is because of the CAS (compare and swap) operations supported by gcc. MVSC supports those?

  2. antocuni commented on Nov 29, 2017

    @antocuni
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions