• Seth Brenith's avatar
    Avoid overflow when profiling builtins · ab52d525
    Seth Brenith authored
    The basic block instrumentation currently uses 32-bit integers, which
    could overflow during a long profiling session. I considered upgrading
    them to 64-bit integers, but generating the correct instrumentation code
    for various architectures would be rather non-trivial. Instead, this
    change uses 64-bit floating-point values, which are simple and also have
    the nice behavior that they saturate rather than overflowing.
    
    Bug: v8:10470
    Change-Id: I60f7456cb750091809803c03a85dd348dc614b58
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2545573Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
    Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
    Cr-Commit-Position: refs/heads/master@{#71297}
    ab52d525
test-basic-block-profiler.cc 2.71 KB