Skip to content
Snippets Groups Projects
  • Michael Anthony Knyszek's avatar
    79781e8d
    runtime: move malloc stats into consistentHeapStats · 79781e8d
    Michael Anthony Knyszek authored
    This change moves the mcache-local malloc stats into the
    consistentHeapStats structure so the malloc stats can be managed
    consistently with the memory stats. The one exception here is
    tinyAllocs for which moving that into the global stats would incur
    several atomic writes on the fast path. Microbenchmarks for just one CPU
    core have shown a 50% loss in throughput. Since tiny allocation counnt
    isn't exposed anyway and is always blindly added to both allocs and
    frees, let that stay inconsistent and flush the tiny allocation count
    every so often.
    
    Change-Id: I2a4b75f209c0e659b9c0db081a3287bf227c10ca
    Reviewed-on: https://go-review.googlesource.com/c/go/+/247039
    
    
    Run-TryBot: Michael Knyszek <mknyszek@google.com>
    TryBot-Result: Go Bot <gobot@golang.org>
    Trust: Michael Knyszek <mknyszek@google.com>
    Reviewed-by: default avatarMichael Pratt <mpratt@google.com>
    79781e8d
    History
    runtime: move malloc stats into consistentHeapStats
    Michael Anthony Knyszek authored
    This change moves the mcache-local malloc stats into the
    consistentHeapStats structure so the malloc stats can be managed
    consistently with the memory stats. The one exception here is
    tinyAllocs for which moving that into the global stats would incur
    several atomic writes on the fast path. Microbenchmarks for just one CPU
    core have shown a 50% loss in throughput. Since tiny allocation counnt
    isn't exposed anyway and is always blindly added to both allocs and
    frees, let that stay inconsistent and flush the tiny allocation count
    every so often.
    
    Change-Id: I2a4b75f209c0e659b9c0db081a3287bf227c10ca
    Reviewed-on: https://go-review.googlesource.com/c/go/+/247039
    
    
    Run-TryBot: Michael Knyszek <mknyszek@google.com>
    TryBot-Result: Go Bot <gobot@golang.org>
    Trust: Michael Knyszek <mknyszek@google.com>
    Reviewed-by: default avatarMichael Pratt <mpratt@google.com>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.