debuginfo

package
v0.30.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 36 Imported by: 3

Documentation

Overview

Copyright 2022-2024 The Parca Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache added in v0.20.0

type Cache[K comparable, V any] interface {
	Add(key K, value V)
	Get(key K) (V, bool)
	Purge()
	Close() error
}

type Finder added in v0.6.0

type Finder struct {
	// contains filtered or unexported fields
}

Finder finds the separate debug information files on the system.

func NewFinder added in v0.6.0

func NewFinder(logger log.Logger, tracer trace.Tracer, reg prometheus.Registerer, debugDirs []string) *Finder

NewFinder creates a new Finder.

func (*Finder) Close added in v0.20.0

func (f *Finder) Close() error

func (*Finder) Find added in v0.6.0

func (f *Finder) Find(ctx context.Context, root string, obj *objectfile.ObjectFile) (string, error)

Find finds the separate debug file for the given object file.

type Manager added in v0.10.0

type Manager struct {
	*elfwriter.Extractor
	*Finder
	// contains filtered or unexported fields
}

Manager is a mechanism for extracting or finding the relevant debug information for the discovered executables.

func New added in v0.6.0

func New(
	logger log.Logger,
	tp trace.TracerProvider,
	reg prometheus.Registerer,
	objFilePool *objectfile.Pool,
	debuginfoClient debuginfopb.DebuginfoServiceClient,
	config ManagerConfig,
) *Manager

New creates a new Manager.

func (*Manager) Close added in v0.20.0

func (di *Manager) Close() error

func (*Manager) Extract added in v0.20.0

func (*Manager) ExtractOrFind added in v0.20.0

func (di *Manager) ExtractOrFind(ctx context.Context, root string, src *objectfile.ObjectFile) (*objectfile.ObjectFile, error)

ExtractOrFind extracts or finds the debug information for the given object file. And sets the debuginfo file pointer to the debuginfo object file.

func (*Manager) ShouldInitiateUpload added in v0.20.0

func (di *Manager) ShouldInitiateUpload(ctx context.Context, buildID string) (_ bool, err error)

ShouldInitiateUpload checks whether the debuginfo file associated with the given buildID should be uploaded. If the buildID is already in the cache, there is no need to extract, find or upload the debuginfo file.

func (*Manager) Upload added in v0.20.0

func (di *Manager) Upload(ctx context.Context, dbg *objectfile.ObjectFile) (err error)

func (*Manager) UploadMapping added in v0.20.0

func (di *Manager) UploadMapping(ctx context.Context, m *process.Mapping) (err error)

UploadMapping uploads that the debuginfo file associated (found or extracted) with the given mapping has been uploaded to the server. If the debuginfo file has not been uploaded yet, it will be uploaded.

type ManagerConfig added in v0.27.0

type ManagerConfig struct {
	UploadMaxParallel     int
	UploadTimeout         time.Duration
	CachingDisabled       bool
	DebugDirs             []string
	StripDebuginfos       bool
	CompressDWARFSections bool
	TempDir               string
}

type NoopClient

type NoopClient struct{}

func NewNoopClient

func NewNoopClient() *NoopClient

func (*NoopClient) InitiateUpload added in v0.11.0

func (*NoopClient) MarkUploadFinished added in v0.11.0

func (*NoopClient) ShouldInitiateUpload added in v0.11.0

func (*NoopClient) Upload

type NoopDebuginfoManager added in v0.20.0

type NoopDebuginfoManager struct{}

func (NoopDebuginfoManager) Close added in v0.20.0

func (NoopDebuginfoManager) Close() error

func (NoopDebuginfoManager) ExtractOrFind added in v0.20.0

func (NoopDebuginfoManager) ShouldInitiateUpload added in v0.20.0

func (NoopDebuginfoManager) ShouldInitiateUpload(ctx context.Context, buildID string) (bool, error)

func (NoopDebuginfoManager) Upload added in v0.20.0

func (NoopDebuginfoManager) UploadMapping added in v0.20.0

func (NoopDebuginfoManager) UploadMapping(ctx context.Context, m *process.Mapping) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL