github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/runtime/trace2map.go (about)

     1  // Copyright 2023 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build goexperiment.exectracer2
     6  
     7  // Simple hash table for tracing. Provides a mapping
     8  // between variable-length data and a unique ID. Subsequent
     9  // puts of the same data will return the same ID.
    10  //
    11  // Uses a region-based allocation scheme and assumes that the
    12  // table doesn't ever grow very big.
    13  //
    14  // This is definitely not a general-purpose hash table! It avoids
    15  // doing any high-level Go operations so it's safe to use even in
    16  // sensitive contexts.
    17  
    18  package runtime