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 ¶
- type Cache
- type Finder
- type Manager
- func (di *Manager) Close() error
- func (di *Manager) Extract(ctx context.Context, src *objectfile.ObjectFile) (*objectfile.ObjectFile, error)
- func (di *Manager) ExtractOrFind(ctx context.Context, root string, src *objectfile.ObjectFile) (*objectfile.ObjectFile, error)
- func (di *Manager) ShouldInitiateUpload(ctx context.Context, buildID string) (_ bool, err error)
- func (di *Manager) Upload(ctx context.Context, dbg *objectfile.ObjectFile) (err error)
- func (di *Manager) UploadMapping(ctx context.Context, m *process.Mapping) (err error)
- type ManagerConfig
- type NoopClient
- func (c *NoopClient) InitiateUpload(ctx context.Context, in *debuginfopb.InitiateUploadRequest, ...) (*debuginfopb.InitiateUploadResponse, error)
- func (c *NoopClient) MarkUploadFinished(ctx context.Context, in *debuginfopb.MarkUploadFinishedRequest, ...) (*debuginfopb.MarkUploadFinishedResponse, error)
- func (c *NoopClient) ShouldInitiateUpload(ctx context.Context, in *debuginfopb.ShouldInitiateUploadRequest, ...) (*debuginfopb.ShouldInitiateUploadResponse, error)
- func (c *NoopClient) Upload(ctx context.Context, opts ...grpc.CallOption) (debuginfopb.DebuginfoService_UploadClient, error)
- type NoopDebuginfoManager
- func (NoopDebuginfoManager) Close() error
- func (NoopDebuginfoManager) ExtractOrFind(_ context.Context, _ string, obj *objectfile.ObjectFile) (*objectfile.ObjectFile, error)
- func (NoopDebuginfoManager) ShouldInitiateUpload(ctx context.Context, buildID string) (bool, error)
- func (NoopDebuginfoManager) Upload(context.Context, *objectfile.ObjectFile) error
- func (NoopDebuginfoManager) UploadMapping(ctx context.Context, m *process.Mapping) error
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) 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
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) Extract ¶ added in v0.20.0
func (di *Manager) Extract(ctx context.Context, src *objectfile.ObjectFile) (*objectfile.ObjectFile, error)
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
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
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 NoopClient ¶
type NoopClient struct{}
func NewNoopClient ¶
func NewNoopClient() *NoopClient
func (*NoopClient) InitiateUpload ¶ added in v0.11.0
func (c *NoopClient) InitiateUpload(ctx context.Context, in *debuginfopb.InitiateUploadRequest, opts ...grpc.CallOption) (*debuginfopb.InitiateUploadResponse, error)
func (*NoopClient) MarkUploadFinished ¶ added in v0.11.0
func (c *NoopClient) MarkUploadFinished(ctx context.Context, in *debuginfopb.MarkUploadFinishedRequest, opts ...grpc.CallOption) (*debuginfopb.MarkUploadFinishedResponse, error)
func (*NoopClient) ShouldInitiateUpload ¶ added in v0.11.0
func (c *NoopClient) ShouldInitiateUpload(ctx context.Context, in *debuginfopb.ShouldInitiateUploadRequest, opts ...grpc.CallOption) (*debuginfopb.ShouldInitiateUploadResponse, error)
func (*NoopClient) Upload ¶
func (c *NoopClient) Upload(ctx context.Context, opts ...grpc.CallOption) (debuginfopb.DebuginfoService_UploadClient, error)
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) ExtractOrFind(_ context.Context, _ string, obj *objectfile.ObjectFile) (*objectfile.ObjectFile, error)
func (NoopDebuginfoManager) ShouldInitiateUpload ¶ added in v0.20.0
func (NoopDebuginfoManager) Upload ¶ added in v0.20.0
func (NoopDebuginfoManager) Upload(context.Context, *objectfile.ObjectFile) error