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
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
36c08110
Commit
36c08110
authored
Jun 27, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
43908ecb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
111 deletions
+49
-111
go/neo/neo.go
go/neo/neo.go
+2
-0
go/neo/trace.go
go/neo/trace.go
+44
-40
go/neo/trace.s
go/neo/trace.s
+2
-0
go/xcommon/tracing/cmd/gotracegen/gotracegen.go
go/xcommon/tracing/cmd/gotracegen/gotracegen.go
+1
-0
go/xcommon/x.go
go/xcommon/x.go
+0
-71
No files found.
go/neo/neo.go
View file @
36c08110
...
@@ -22,6 +22,8 @@
...
@@ -22,6 +22,8 @@
// XXX text
// XXX text
package
neo
package
neo
//go:generate sh -c "go run ../xcommon/tracing/cmd/gotracegen/gotracegen.go ."
import
(
import
(
"lab.nexedi.com/kirr/neo/go/zodb"
"lab.nexedi.com/kirr/neo/go/zodb"
)
)
...
...
go/neo/trace.go
View file @
36c08110
// Copyright (C) 2016-2017 Nexedi SA and Contributors.
// Code generated by lab.nexedi.com/kirr/go123/tracing/cmd/gotrace; DO NOT EDIT.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
// it under the terms of the GNU General Public License version 3, or (at your
// option) any later version, as published by the Free Software Foundation.
//
// You can also Link and Combine this program with other software covered by
// the terms of any of the Open Source Initiative approved licenses and Convey
// the resulting work. Corresponding source of such a combination shall include
// the source code for all other software used.
//
// This program is distributed WITHOUT ANY WARRANTY; without even the implied
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// See COPYING file for full licensing terms.
package
neo
// tracepoints
import
(
package
0x5f45c0
"unsafe"
"lab.nexedi.com/kirr/neo/go/xcommon/tracing"
import
(
lab
.
nexedi
.
com
/
kirr
/
neo
/
go
/
xcommon
/
tracing
)
)
// XXX after https://github.com/golang/go/issues/19348 won't cost a function
// traceevent: traceConnRecv(c *Conn, msg Msg) XXX better raw .Text (e.g. comments)
// call when tracepoint is disabled
type
_t_traceConnRecv
struct
{
tracing
.
Probe
probefunc
func
(
c
*
Conn
,
msg
Msg
)
}
// XXX do we need *_Enabled() ?
var
_traceConnRecv
*
_t_traceConnRecv
var
_traceConnRecv
[]
func
(
*
Conn
,
Msg
)
func
traceConnRecv
(
c
*
Conn
,
msg
Msg
)
{
func
traceConnRecv
(
c
*
Conn
,
msg
Msg
)
{
if
_traceConnRecv
=
=
nil
{
if
_traceConnRecv
!
=
nil
{
return
_traceConnRecv_run
(
c
,
msg
)
}
}
}
for
_
,
probe
:=
range
_traceConnRecv
{
func
_traceConnRecv_run
(
c
,
msg
)
{
probe
(
c
,
msg
)
for
p
:=
_traceConnRecv
;
p
!=
nil
;
p
=
(
*
_t_traceConnRecv
)(
unsafe
.
Pointer
(
p
.
Next
()))
{
p
.
probefunc
(
c
,
msg
)
}
}
}
}
// Must be called under tracing.Lock
func
traceConnRecv_Attach
(
pg
*
tracing
.
ProbeGroup
,
probe
func
(
c
*
Conn
,
msg
Msg
))
*
tracing
.
Probe
{
func
traceConnRecv_Attach
(
probe
func
(
*
Conn
,
Msg
))
{
p
:=
_t_traceConnRecv
{
probefunc
:
probe
}
_traceConnRecv
=
append
(
_traceConnRecv
,
probe
)
tracing
.
AttachProbe
(
pg
,
(
**
tracing
.
Probe
)(
unsafe
.
Pointer
(
&
_traceConnRecv
),
&
p
.
Probe
)
return
&
p
.
Probe
}
}
// traceevent: traceConnSend(c *Conn, msg Msg) XXX better raw .Text (e.g. comments)
// traceevent: traceConnSend(c *Conn, msg Msg)
type
_t_traceConnSend
struct
{
type
_t_traceConnSend
struct
{
tracing
.
Probe
tracing
.
Probe
probefunc
func
(
*
Conn
,
Msg
)
probefunc
func
(
c
*
Conn
,
msg
Msg
)
}
}
var
_traceConnSend
*
_t_traceConnSend
var
_traceConnSend
*
_t_traceConnSend
func
traceConnSend
(
c
*
Conn
,
msg
Msg
)
{
func
traceConnSend
(
c
*
Conn
,
msg
Msg
)
{
if
_traceConnSend
!=
nil
{
if
_traceConnSend
!=
nil
{
_traceConnSend_run
probev
(
c
,
msg
)
_traceConnSend_run
(
c
,
msg
)
}
}
}
}
func
_traceConnSend_run
probev
(
c
*
Conn
,
msg
M
sg
)
{
func
_traceConnSend_run
(
c
,
m
sg
)
{
for
p
:=
_traceConnSend
;
p
!=
nil
;
p
=
(
*
_t_traceConnSend
)(
unsafe
.
Pointer
(
p
.
Next
()))
{
for
p
:=
_traceConnSend
;
p
!=
nil
;
p
=
(
*
_t_traceConnSend
)(
unsafe
.
Pointer
(
p
.
Next
()))
{
p
.
probefunc
(
c
,
msg
)
p
.
probefunc
(
c
,
msg
)
}
}
}
}
func
traceConnSend_Attach
(
pg
*
tracing
.
ProbeGroup
,
probe
func
(
*
Conn
,
Msg
))
*
tracing
.
Probe
{
func
traceConnSend_Attach
(
pg
*
tracing
.
ProbeGroup
,
probe
func
(
c
*
Conn
,
msg
Msg
))
*
tracing
.
Probe
{
p
:=
_t_traceConnSend
{
probefunc
:
probe
}
p
:=
_t_traceConnSend
{
probefunc
:
probe
}
tracing
.
AttachProbe
(
pg
,
(
**
tracing
.
Probe
)(
unsafe
.
Pointer
(
&
_traceConnSend
)
)
,
&
p
.
Probe
)
tracing
.
AttachProbe
(
pg
,
(
**
tracing
.
Probe
)(
unsafe
.
Pointer
(
&
_traceConnSend
),
&
p
.
Probe
)
return
&
p
.
Probe
return
&
p
.
Probe
}
}
// traceimport: lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet
//go:linkname pipenet_traceAccept_Attach lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet.traceAccept_Attach
func
pipenet_traceAccept_Attach
(
*
tracing
.
ProbeGroup
,
func
(
conn
net
.
Conn
))
*
tracing
.
Probe
//go:linkname pipenet_traceDial_Attach lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet.traceDial_Attach
func
pipenet_traceDial_Attach
(
*
tracing
.
ProbeGroup
,
func
(
addr
string
))
*
tracing
.
Probe
//go:linkname pipenet_traceListen_Attach lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet.traceListen_Attach
func
pipenet_traceListen_Attach
(
*
tracing
.
ProbeGroup
,
func
(
laddr
string
))
*
tracing
.
Probe
//go:linkname pipenet_traceNew_Attach lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet.traceNew_Attach
func
pipenet_traceNew_Attach
(
*
tracing
.
ProbeGroup
,
func
(
name
string
))
*
tracing
.
Probe
//go:linkname pipenet_traceNewHost_Attach lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet.traceNewHost_Attach
func
pipenet_traceNewHost_Attach
(
*
tracing
.
ProbeGroup
,
func
(
host
*
Host
))
*
tracing
.
Probe
go/neo/trace.s
0 → 100644
View file @
36c08110
//
Code
generated
by
lab
.
nexedi
.
com
/
kirr
/
go123
/
tracing
/
cmd
/
gotrace
; DO NOT EDIT.
//
empty
.
s
so
`
go
build
`
does
not
use
-
complete
for
go
:
linkname
to
work
go/xcommon/tracing/cmd/gotracegen/gotracegen.go
View file @
36c08110
...
@@ -385,6 +385,7 @@ func tracegen(pkgpath string) error {
...
@@ -385,6 +385,7 @@ func tracegen(pkgpath string) error {
log
.
Fatal
(
err
)
log
.
Fatal
(
err
)
}
}
// XXX vvv needed only if there are trace imports
// write empty trace.s so go:linkname works
// write empty trace.s so go:linkname works
buf
.
Reset
()
buf
.
Reset
()
buf
.
WriteString
(
magic
)
buf
.
WriteString
(
magic
)
...
...
go/xcommon/x.go
deleted
100644 → 0
View file @
43908ecb
// traceevent: traceConnRecv(c *Conn, msg Msg) XXX better raw .Text (e.g. comments)
type
_t_traceConnRecv
struct
{
tracing
.
Probe
probefunc
func
(
c
*
Conn
,
msg
Msg
)
}
var
_traceConnRecv
*
_t_traceConnRecv
func
traceConnRecv
(
c
*
Conn
,
msg
Msg
)
{
if
_traceConnRecv
!=
nil
{
_traceConnRecv_run
(
c
,
msg
)
}
}
func
_traceConnRecv_run
(
c
,
msg
)
{
for
p
:=
_traceConnRecv
;
p
!=
nil
;
p
=
(
*
_t_traceConnRecv
)(
unsafe
.
Pointer
(
p
.
Next
()))
{
p
.
probefunc
(
c
,
msg
)
}
}
func
traceConnRecv_Attach
(
pg
*
tracing
.
ProbeGroup
,
probe
func
(
c
*
Conn
,
msg
Msg
))
*
tracing
.
Probe
{
p
:=
_t_traceConnRecv
{
probefunc
:
probe
}
tracing
.
AttachProbe
(
pg
,
(
**
tracing
.
Probe
)(
unsafe
.
Pointer
(
&
_traceConnRecv
),
&
p
.
Probe
)
return
&
p
.
Probe
}
// traceevent: traceConnSend(c *Conn, msg Msg) XXX better raw .Text (e.g. comments)
type
_t_traceConnSend
struct
{
tracing
.
Probe
probefunc
func
(
c
*
Conn
,
msg
Msg
)
}
var
_traceConnSend
*
_t_traceConnSend
func
traceConnSend
(
c
*
Conn
,
msg
Msg
)
{
if
_traceConnSend
!=
nil
{
_traceConnSend_run
(
c
,
msg
)
}
}
func
_traceConnSend_run
(
c
,
msg
)
{
for
p
:=
_traceConnSend
;
p
!=
nil
;
p
=
(
*
_t_traceConnSend
)(
unsafe
.
Pointer
(
p
.
Next
()))
{
p
.
probefunc
(
c
,
msg
)
}
}
func
traceConnSend_Attach
(
pg
*
tracing
.
ProbeGroup
,
probe
func
(
c
*
Conn
,
msg
Msg
))
*
tracing
.
Probe
{
p
:=
_t_traceConnSend
{
probefunc
:
probe
}
tracing
.
AttachProbe
(
pg
,
(
**
tracing
.
Probe
)(
unsafe
.
Pointer
(
&
_traceConnSend
),
&
p
.
Probe
)
return
&
p
.
Probe
}
// traceimport: lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet
//go:linkname pipenet_traceAccept_Attach lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet.traceAccept_Attach
func
pipenet_traceAccept_Attach
(
*
tracing
.
ProbeGroup
,
func
(
conn
net
.
Conn
))
*
tracing
.
Probe
//go:linkname pipenet_traceDial_Attach lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet.traceDial_Attach
func
pipenet_traceDial_Attach
(
*
tracing
.
ProbeGroup
,
func
(
addr
string
))
*
tracing
.
Probe
//go:linkname pipenet_traceListen_Attach lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet.traceListen_Attach
func
pipenet_traceListen_Attach
(
*
tracing
.
ProbeGroup
,
func
(
laddr
string
))
*
tracing
.
Probe
//go:linkname pipenet_traceNew_Attach lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet.traceNew_Attach
func
pipenet_traceNew_Attach
(
*
tracing
.
ProbeGroup
,
func
(
name
string
))
*
tracing
.
Probe
//go:linkname pipenet_traceNewHost_Attach lab.nexedi.com/kirr/neo/go/xcommon/xnet/pipenet.traceNewHost_Attach
func
pipenet_traceNewHost_Attach
(
*
tracing
.
ProbeGroup
,
func
(
host
*
Host
))
*
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