Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
b9869658
Commit
b9869658
authored
Jul 04, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
fc1fa022
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
1 deletion
+53
-1
go/xcommon/tracing/cmd/gotrace/gotrace.go
go/xcommon/tracing/cmd/gotrace/gotrace.go
+13
-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
+26
-0
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
+14
-0
No files found.
go/xcommon/tracing/cmd/gotrace/gotrace.go
View file @
b9869658
...
@@ -626,6 +626,10 @@ func (p *Program) Import(pkgpath string) (prog *loader.Program, pkgi *loader.Pac
...
@@ -626,6 +626,10 @@ func (p *Program) Import(pkgpath string) (prog *loader.Program, pkgi *loader.Pac
return
nil
,
nil
,
err
return
nil
,
nil
,
err
}
}
if
!
(
len
(
prog
.
Created
)
==
0
&&
len
(
prog
.
Imported
)
==
1
)
{
panic
(
"import"
)
}
p
.
progv
=
append
(
p
.
progv
,
prog
)
p
.
progv
=
append
(
p
.
progv
,
prog
)
pkgi
=
prog
.
InitialPackages
()[
0
]
pkgi
=
prog
.
InitialPackages
()[
0
]
return
prog
,
pkgi
,
nil
return
prog
,
pkgi
,
nil
...
@@ -643,10 +647,14 @@ func (p *Program) ImportWithTests(pkgpath string) (prog *loader.Program, pkgi *l
...
@@ -643,10 +647,14 @@ func (p *Program) ImportWithTests(pkgpath string) (prog *loader.Program, pkgi *l
return
nil
,
nil
,
nil
,
err
return
nil
,
nil
,
nil
,
err
}
}
pkgi
=
prog
.
InitialPackages
()[
0
]
if
len
(
prog
.
Imported
)
!=
1
{
panic
(
"import with tests"
)
}
if
len
(
prog
.
Created
)
>
0
{
if
len
(
prog
.
Created
)
>
0
{
xtestPkgi
=
prog
.
Created
[
0
]
xtestPkgi
=
prog
.
Created
[
0
]
}
}
for
_
,
pkgi
=
range
prog
.
Imported
{}
return
prog
,
pkgi
,
xtestPkgi
,
nil
return
prog
,
pkgi
,
xtestPkgi
,
nil
}
}
...
@@ -661,6 +669,10 @@ func tracegen(pkgpath string, ctxt *build.Context, cwd string) error {
...
@@ -661,6 +669,10 @@ func tracegen(pkgpath string, ctxt *build.Context, cwd string) error {
P
:=
NewProgram
(
ctxt
,
cwd
)
P
:=
NewProgram
(
ctxt
,
cwd
)
lprog
,
pkgi
,
xtestPkgi
,
err
:=
P
.
ImportWithTests
(
pkgpath
)
lprog
,
pkgi
,
xtestPkgi
,
err
:=
P
.
ImportWithTests
(
pkgpath
)
//fmt.Println(pkgpath)
//fmt.Printf("%#p\n", pkgi)
//fmt.Printf("%#p\n", xtestPkgi)
//panic(0)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
go/xcommon/tracing/cmd/gotrace/testdata/src/c/pkg3/ztrace_test.go.ok
0 → 100644
View file @
b9869658
//
Code
generated
by
lab
.
nexedi
.
com
/
kirr
/
go123
/
tracing
/
cmd
/
gotrace
;
DO
NOT
EDIT
.
package
pkg3
//
code
generated
for
tracepoints
import
(
"lab.nexedi.com/kirr/neo/go/xcommon/tracing"
"unsafe"
aaa1
"a/pkg1"
"net/url"
)
//
traceimport
:
aaa1
"a/pkg1"
//
go
:
linkname
aaa1_traceDoSomething_Attach
a
/
pkg1
.
traceDoSomething_Attach
func
aaa1_traceDoSomething_Attach
(*
tracing
.
ProbeGroup
,
func
(
topic
string
))
*
tracing
.
Probe
//
go
:
linkname
aaa1_traceNewT_Attach
a
/
pkg1
.
traceNewT_Attach
func
aaa1_traceNewT_Attach
(*
tracing
.
ProbeGroup
,
func
(
t
*
aaa1
.
T
))
*
tracing
.
Probe
//
go
:
linkname
aaa1_traceNewTPre_Attach
a
/
pkg1
.
traceNewTPre_Attach
func
aaa1_traceNewTPre_Attach
(*
tracing
.
ProbeGroup
,
func
())
*
tracing
.
Probe
//
go
:
linkname
aaa1_traceURLParsed_Attach
a
/
pkg1
.
traceURLParsed_Attach
func
aaa1_traceURLParsed_Attach
(*
tracing
.
ProbeGroup
,
func
(
u
*
url
.
URL
))
*
tracing
.
Probe
go/xcommon/tracing/cmd/gotrace/testdata/src/c/pkg3/ztrace_x_test.go.ok
0 → 100644
View file @
b9869658
//
Code
generated
by
lab
.
nexedi
.
com
/
kirr
/
go123
/
tracing
/
cmd
/
gotrace
;
DO
NOT
EDIT
.
package
pkg3_test
//
code
generated
for
tracepoints
import
(
"lab.nexedi.com/kirr/neo/go/xcommon/tracing"
"unsafe"
)
//
traceimport
:
"b/pkg2"
//
go
:
linkname
pkg2_traceDoSomething_Attach
b
/
pkg2
.
traceDoSomething_Attach
func
pkg2_traceDoSomething_Attach
(*
tracing
.
ProbeGroup
,
func
(
i
,
j
int
,
q
string
))
*
tracing
.
Probe
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