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

.

parent 43908ecb
......@@ -22,6 +22,8 @@
// XXX text
package neo
//go:generate sh -c "go run ../xcommon/tracing/cmd/gotracegen/gotracegen.go ."
import (
"lab.nexedi.com/kirr/neo/go/zodb"
)
......
// Copyright (C) 2016-2017 Nexedi SA and Contributors.
// 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
// Code generated by lab.nexedi.com/kirr/go123/tracing/cmd/gotrace; DO NOT EDIT.
import (
"unsafe"
package 0x5f45c0
"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
// call when tracepoint is disabled
// 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)
}
// XXX do we need *_Enabled() ?
var _traceConnRecv *_t_traceConnRecv
var _traceConnRecv []func(*Conn, Msg)
func traceConnRecv(c *Conn, msg Msg) {
if _traceConnRecv == nil {
return
if _traceConnRecv != nil {
_traceConnRecv_run(c, msg)
}
}
for _, probe := range _traceConnRecv {
probe(c, msg)
func _traceConnRecv_run(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(probe func(*Conn, Msg)) {
_traceConnRecv = append(_traceConnRecv, probe)
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)
// traceevent: traceConnSend(c *Conn, msg Msg) XXX better raw .Text (e.g. comments)
type _t_traceConnSend struct {
tracing.Probe
probefunc func(*Conn, Msg)
probefunc func(c *Conn, msg Msg)
}
var _traceConnSend *_t_traceConnSend
func traceConnSend(c *Conn, msg Msg) {
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())) {
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}
tracing.AttachProbe(pg, (**tracing.Probe)(unsafe.Pointer(&_traceConnSend)), &p.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
// 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 {
log.Fatal(err)
}
// XXX vvv needed only if there are trace imports
// write empty trace.s so go:linkname works
buf.Reset()
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