Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
a4cfd3bb
Commit
a4cfd3bb
authored
Jul 05, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
155fe341
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
go/xcommon/tracing/cmd/gotrace/gotrace.go
go/xcommon/tracing/cmd/gotrace/gotrace.go
+2
-1
go/xcommon/tracing/cmd/gotrace/testdata/src/b/pkg2/ztrace.go.ok
...mmon/tracing/cmd/gotrace/testdata/src/b/pkg2/ztrace.go.ok
+2
-1
go/xcommon/tracing/cmd/gotrace/testdata/src/c/pkg3/ztrace_test.go.ok
...tracing/cmd/gotrace/testdata/src/c/pkg3/ztrace_test.go.ok
+2
-1
go/xcommon/tracing/cmd/gotrace/testdata/src/c/pkg3/ztrace_x_test.go.ok
...acing/cmd/gotrace/testdata/src/c/pkg3/ztrace_x_test.go.ok
+2
-1
No files found.
go/xcommon/tracing/cmd/gotrace/gotrace.go
View file @
a4cfd3bb
...
@@ -514,9 +514,10 @@ func {{.ImportSpec.PkgName}}_{{.Name}}_Attach(*tracing.ProbeGroup, func({{.ArgvT
...
@@ -514,9 +514,10 @@ func {{.ImportSpec.PkgName}}_{{.Name}}_Attach(*tracing.ProbeGroup, func({{.ArgvT
// traceEventImportCheckTmpl is code template generated to check consistency with one imported package
// traceEventImportCheckTmpl is code template generated to check consistency with one imported package
var
traceEventImportCheckTmpl
=
template
.
Must
(
template
.
New
(
"traceimportcheck"
)
.
Parse
(
`
var
traceEventImportCheckTmpl
=
template
.
Must
(
template
.
New
(
"traceimportcheck"
)
.
Parse
(
`
// rerun "gotrace gen" if you see link failure ↓↓↓
//go:linkname {{.ImportSpec.PkgName}}_trace_exporthash {{.ImportSpec.PkgPath}}._trace_exporthash_{{.ExportHash}}
//go:linkname {{.ImportSpec.PkgName}}_trace_exporthash {{.ImportSpec.PkgPath}}._trace_exporthash_{{.ExportHash}}
func {{.ImportSpec.PkgName}}_trace_exporthash()
func {{.ImportSpec.PkgName}}_trace_exporthash()
func init() { {{.ImportSpec.PkgName}}_trace_exporthash() }
// rerun "gotrace gen" if you see link failure here
func init() { {{.ImportSpec.PkgName}}_trace_exporthash() }
`
))
`
))
// magic begins all files generated by gotrace
// magic begins all files generated by gotrace
...
...
go/xcommon/tracing/cmd/gotrace/testdata/src/b/pkg2/ztrace.go.ok
View file @
a4cfd3bb
...
@@ -43,9 +43,10 @@ func _trace_exporthash_80ddfc2f6c72bdf357dedbb2f0bbec85e93106fc() {}
...
@@ -43,9 +43,10 @@ func _trace_exporthash_80ddfc2f6c72bdf357dedbb2f0bbec85e93106fc() {}
//
traceimport
:
"a/pkg1"
//
traceimport
:
"a/pkg1"
//
rerun
"gotrace gen"
if
you
see
link
failure
↓↓↓
//
go
:
linkname
pkg1_trace_exporthash
a
/
pkg1
.
_trace_exporthash_965fa599dc3a61119faba1eacf8493973c5d87ad
//
go
:
linkname
pkg1_trace_exporthash
a
/
pkg1
.
_trace_exporthash_965fa599dc3a61119faba1eacf8493973c5d87ad
func
pkg1_trace_exporthash
()
func
pkg1_trace_exporthash
()
func
init
()
{
pkg1_trace_exporthash
()
}
//
rerun
"gotrace gen"
if
you
see
link
failure
here
func
init
()
{
pkg1_trace_exporthash
()
}
//
go
:
linkname
pkg1_traceDoSomething_Attach
a
/
pkg1
.
traceDoSomething_Attach
//
go
:
linkname
pkg1_traceDoSomething_Attach
a
/
pkg1
.
traceDoSomething_Attach
...
...
go/xcommon/tracing/cmd/gotrace/testdata/src/c/pkg3/ztrace_test.go.ok
View file @
a4cfd3bb
...
@@ -13,9 +13,10 @@ import (
...
@@ -13,9 +13,10 @@ import (
//
traceimport
:
aaa1
"a/pkg1"
//
traceimport
:
aaa1
"a/pkg1"
//
rerun
"gotrace gen"
if
you
see
link
failure
↓↓↓
//
go
:
linkname
aaa1_trace_exporthash
a
/
pkg1
.
_trace_exporthash_965fa599dc3a61119faba1eacf8493973c5d87ad
//
go
:
linkname
aaa1_trace_exporthash
a
/
pkg1
.
_trace_exporthash_965fa599dc3a61119faba1eacf8493973c5d87ad
func
aaa1_trace_exporthash
()
func
aaa1_trace_exporthash
()
func
init
()
{
aaa1_trace_exporthash
()
}
//
rerun
"gotrace gen"
if
you
see
link
failure
here
func
init
()
{
aaa1_trace_exporthash
()
}
//
go
:
linkname
aaa1_traceDoSomething_Attach
a
/
pkg1
.
traceDoSomething_Attach
//
go
:
linkname
aaa1_traceDoSomething_Attach
a
/
pkg1
.
traceDoSomething_Attach
...
...
go/xcommon/tracing/cmd/gotrace/testdata/src/c/pkg3/ztrace_x_test.go.ok
View file @
a4cfd3bb
...
@@ -10,9 +10,10 @@ import (
...
@@ -10,9 +10,10 @@ import (
//
traceimport
:
"b/pkg2"
//
traceimport
:
"b/pkg2"
//
rerun
"gotrace gen"
if
you
see
link
failure
↓↓↓
//
go
:
linkname
pkg2_trace_exporthash
b
/
pkg2
.
_trace_exporthash_80ddfc2f6c72bdf357dedbb2f0bbec85e93106fc
//
go
:
linkname
pkg2_trace_exporthash
b
/
pkg2
.
_trace_exporthash_80ddfc2f6c72bdf357dedbb2f0bbec85e93106fc
func
pkg2_trace_exporthash
()
func
pkg2_trace_exporthash
()
func
init
()
{
pkg2_trace_exporthash
()
}
//
rerun
"gotrace gen"
if
you
see
link
failure
here
func
init
()
{
pkg2_trace_exporthash
()
}
//
go
:
linkname
pkg2_traceDoSomething_Attach
b
/
pkg2
.
traceDoSomething_Attach
//
go
:
linkname
pkg2_traceDoSomething_Attach
b
/
pkg2
.
traceDoSomething_Attach
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment