Commit 36c08110 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 43908ecb
...@@ -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"
) )
......
// 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_runprobev(c, msg) _traceConnSend_run(c, msg)
} }
} }
func _traceConnSend_runprobev(c *Conn, msg Msg) { func _traceConnSend_run(c, msg) {
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
// 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
...@@ -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)
......
// 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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment