turn hidden --trace into a NOP

The --trace has helped in early stages analyze Podman code.  However,
it's contributing to dependency and binary bloat.  The standard go
tooling can also help in profiling, so let's turn `--trace` into a NOP.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2021-02-25 20:47:21 +01:00
parent 320df83881
commit d0d084dd8c
135 changed files with 13 additions and 15022 deletions

View File

@ -12,7 +12,6 @@ import (
"github.com/containers/podman/v3/libpod/define"
"github.com/containers/podman/v3/libpod/events"
"github.com/containers/podman/v3/pkg/signal"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
@ -28,10 +27,6 @@ import (
// containers). The `recursive` parameter will, if set to true, start these
// dependency containers before initializing this container.
func (c *Container) Init(ctx context.Context, recursive bool) error {
span, _ := opentracing.StartSpanFromContext(ctx, "containerInit")
span.SetTag("struct", "container")
defer span.Finish()
if !c.batched {
c.lock.Lock()
defer c.lock.Unlock()
@ -84,10 +79,6 @@ func (c *Container) Init(ctx context.Context, recursive bool) error {
// running before being run. The recursive parameter, if set, will start all
// dependencies before starting this container.
func (c *Container) Start(ctx context.Context, recursive bool) error {
span, _ := opentracing.StartSpanFromContext(ctx, "containerStart")
span.SetTag("struct", "container")
defer span.Finish()
if !c.batched {
c.lock.Lock()
defer c.lock.Unlock()