Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

groutinelabel.go 409B

12345678910111213141516171819
  1. // Copyright 2022 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package log
  4. import "unsafe"
  5. //go:linkname runtime_getProfLabel runtime/pprof.runtime_getProfLabel
  6. func runtime_getProfLabel() unsafe.Pointer //nolint
  7. type labelMap map[string]string
  8. func getGoroutineLabels() map[string]string {
  9. l := (*labelMap)(runtime_getProfLabel())
  10. if l == nil {
  11. return nil
  12. }
  13. return *l
  14. }