...
1
2
3
4
5 package objabi
6
7
8
9
10
11
12 type FuncID uint8
13
14 const (
15 FuncID_normal FuncID = iota
16 FuncID_runtime_main
17 FuncID_goexit
18 FuncID_jmpdefer
19 FuncID_mcall
20 FuncID_morestack
21 FuncID_mstart
22 FuncID_rt0_go
23 FuncID_asmcgocall
24 FuncID_sigpanic
25 FuncID_runfinq
26 FuncID_gcBgMarkWorker
27 FuncID_systemstack_switch
28 FuncID_systemstack
29 FuncID_cgocallback_gofunc
30 FuncID_gogo
31 FuncID_externalthreadhandler
32 FuncID_debugCallV1
33 FuncID_gopanic
34 FuncID_panicwrap
35 FuncID_handleAsyncEvent
36 FuncID_asyncPreempt
37 FuncID_wrapper
38 )
39
40
41
42 func GetFuncID(name string, isWrapper bool) FuncID {
43 if isWrapper {
44 return FuncID_wrapper
45 }
46 switch name {
47 case "runtime.main":
48 return FuncID_runtime_main
49 case "runtime.goexit":
50 return FuncID_goexit
51 case "runtime.jmpdefer":
52 return FuncID_jmpdefer
53 case "runtime.mcall":
54 return FuncID_mcall
55 case "runtime.morestack":
56 return FuncID_morestack
57 case "runtime.mstart":
58 return FuncID_mstart
59 case "runtime.rt0_go":
60 return FuncID_rt0_go
61 case "runtime.asmcgocall":
62 return FuncID_asmcgocall
63 case "runtime.sigpanic":
64 return FuncID_sigpanic
65 case "runtime.runfinq":
66 return FuncID_runfinq
67 case "runtime.gcBgMarkWorker":
68 return FuncID_gcBgMarkWorker
69 case "runtime.systemstack_switch":
70 return FuncID_systemstack_switch
71 case "runtime.systemstack":
72 return FuncID_systemstack
73 case "runtime.cgocallback_gofunc":
74 return FuncID_cgocallback_gofunc
75 case "runtime.gogo":
76 return FuncID_gogo
77 case "runtime.externalthreadhandler":
78 return FuncID_externalthreadhandler
79 case "runtime.debugCallV1":
80 return FuncID_debugCallV1
81 case "runtime.gopanic":
82 return FuncID_gopanic
83 case "runtime.panicwrap":
84 return FuncID_panicwrap
85 case "runtime.handleAsyncEvent":
86 return FuncID_handleAsyncEvent
87 case "runtime.asyncPreempt":
88 return FuncID_asyncPreempt
89 case "runtime.deferreturn":
90
91 return FuncID_wrapper
92 case "runtime.runOpenDeferFrame":
93
94 return FuncID_wrapper
95 case "runtime.reflectcallSave":
96
97 return FuncID_wrapper
98 }
99 return FuncID_normal
100 }
101
View as plain text