Documentation ¶
Index ¶
- Variables
- func GetLocationsByIDs(ctx context.Context, s ProfileMetaStore, ids ...[]byte) (map[string]*Location, error)
- func MakeFunctionKey(f *pb.Function) []byte
- func MakeLocationKey(l *Location) []byte
- func MakeMappingKey(m *pb.Mapping) []byte
- func UnsymbolizableMapping(m *pb.Mapping) bool
- type BadgerLogger
- type BadgerMetastore
- func (m *BadgerMetastore) Close() error
- func (m *BadgerMetastore) CreateFunction(ctx context.Context, f *pb.Function) ([]byte, error)
- func (m *BadgerMetastore) CreateLocation(ctx context.Context, l *Location) ([]byte, error)
- func (m *BadgerMetastore) CreateLocationLines(ctx context.Context, locID []byte, lines []LocationLine) error
- func (m *BadgerMetastore) CreateMapping(ctx context.Context, mapping *pb.Mapping) ([]byte, error)
- func (m *BadgerMetastore) GetFunctionByKey(ctx context.Context, key *pb.Function) (*pb.Function, error)
- func (m *BadgerMetastore) GetFunctions(ctx context.Context) ([]*pb.Function, error)
- func (m *BadgerMetastore) GetFunctionsByIDs(ctx context.Context, ids ...[]byte) (map[string]*pb.Function, error)
- func (m *BadgerMetastore) GetLinesByLocationIDs(ctx context.Context, ids ...[]byte) (map[string][]*pb.Line, [][]byte, error)
- func (m *BadgerMetastore) GetLocationByKey(ctx context.Context, key *Location) (*pb.Location, error)
- func (m *BadgerMetastore) GetLocations(ctx context.Context) ([]*pb.Location, [][]byte, error)
- func (m *BadgerMetastore) GetLocationsByIDs(ctx context.Context, ids ...[]byte) (map[string]*pb.Location, [][]byte, error)
- func (m *BadgerMetastore) GetMappingByKey(ctx context.Context, key *pb.Mapping) (*pb.Mapping, error)
- func (m *BadgerMetastore) GetMappingsByIDs(ctx context.Context, ids ...[]byte) (map[string]*pb.Mapping, error)
- func (m *BadgerMetastore) GetSymbolizableLocations(ctx context.Context) ([]*pb.Location, [][]byte, error)
- func (m *BadgerMetastore) Ping() error
- func (m *BadgerMetastore) Symbolize(ctx context.Context, l *Location) error
- type FunctionKey
- type FunctionStore
- type InMemorySQLiteMetaStore
- func (s InMemorySQLiteMetaStore) Close() error
- func (s InMemorySQLiteMetaStore) CreateFunction(ctx context.Context, fn *pb.Function) ([]byte, error)
- func (s InMemorySQLiteMetaStore) CreateLocation(ctx context.Context, l *Location) ([]byte, error)
- func (s InMemorySQLiteMetaStore) CreateLocationLines(ctx context.Context, locID []byte, lines []LocationLine) error
- func (s InMemorySQLiteMetaStore) CreateMapping(ctx context.Context, m *pb.Mapping) ([]byte, error)
- func (s InMemorySQLiteMetaStore) GetFunctionByKey(ctx context.Context, fkey *pb.Function) (*pb.Function, error)
- func (s InMemorySQLiteMetaStore) GetFunctions(ctx context.Context) ([]*pb.Function, error)
- func (s InMemorySQLiteMetaStore) GetFunctionsByIDs(ctx context.Context, ids ...[]byte) (map[string]*pb.Function, error)
- func (s InMemorySQLiteMetaStore) GetLinesByLocationIDs(ctx context.Context, ids ...[]byte) (map[string][]*pb.Line, [][]byte, error)
- func (s InMemorySQLiteMetaStore) GetLocationByKey(ctx context.Context, lkey *Location) (*pb.Location, error)
- func (s InMemorySQLiteMetaStore) GetLocations(ctx context.Context) ([]*pb.Location, [][]byte, error)
- func (s InMemorySQLiteMetaStore) GetLocationsByIDs(ctx context.Context, ids ...[]byte) (map[string]*pb.Location, [][]byte, error)
- func (s InMemorySQLiteMetaStore) GetMappingByKey(ctx context.Context, mkey *pb.Mapping) (*pb.Mapping, error)
- func (s InMemorySQLiteMetaStore) GetMappingsByIDs(ctx context.Context, ids ...[]byte) (map[string]*pb.Mapping, error)
- func (s InMemorySQLiteMetaStore) GetSymbolizableLocations(ctx context.Context) ([]*pb.Location, [][]byte, error)
- func (s InMemorySQLiteMetaStore) Ping() error
- func (s InMemorySQLiteMetaStore) Symbolize(ctx context.Context, l *Location) error
- type Location
- type LocationKey
- type LocationLine
- type LocationLineStore
- type LocationStore
- type MappingKey
- type MappingStore
- type OnDiskSQLiteMetaStore
- func (s OnDiskSQLiteMetaStore) Close() error
- func (s OnDiskSQLiteMetaStore) CreateFunction(ctx context.Context, fn *pb.Function) ([]byte, error)
- func (s OnDiskSQLiteMetaStore) CreateLocation(ctx context.Context, l *Location) ([]byte, error)
- func (s OnDiskSQLiteMetaStore) CreateLocationLines(ctx context.Context, locID []byte, lines []LocationLine) error
- func (s OnDiskSQLiteMetaStore) CreateMapping(ctx context.Context, m *pb.Mapping) ([]byte, error)
- func (s OnDiskSQLiteMetaStore) GetFunctionByKey(ctx context.Context, fkey *pb.Function) (*pb.Function, error)
- func (s OnDiskSQLiteMetaStore) GetFunctions(ctx context.Context) ([]*pb.Function, error)
- func (s OnDiskSQLiteMetaStore) GetFunctionsByIDs(ctx context.Context, ids ...[]byte) (map[string]*pb.Function, error)
- func (s OnDiskSQLiteMetaStore) GetLinesByLocationIDs(ctx context.Context, ids ...[]byte) (map[string][]*pb.Line, [][]byte, error)
- func (s OnDiskSQLiteMetaStore) GetLocationByKey(ctx context.Context, lkey *Location) (*pb.Location, error)
- func (s OnDiskSQLiteMetaStore) GetLocations(ctx context.Context) ([]*pb.Location, [][]byte, error)
- func (s OnDiskSQLiteMetaStore) GetLocationsByIDs(ctx context.Context, ids ...[]byte) (map[string]*pb.Location, [][]byte, error)
- func (s OnDiskSQLiteMetaStore) GetMappingByKey(ctx context.Context, mkey *pb.Mapping) (*pb.Mapping, error)
- func (s OnDiskSQLiteMetaStore) GetMappingsByIDs(ctx context.Context, ids ...[]byte) (map[string]*pb.Mapping, error)
- func (s OnDiskSQLiteMetaStore) GetSymbolizableLocations(ctx context.Context) ([]*pb.Location, [][]byte, error)
- func (s OnDiskSQLiteMetaStore) Ping() error
- func (s OnDiskSQLiteMetaStore) Symbolize(ctx context.Context, l *Location) error
- type ProfileMetaStore
- type RandomUUIDGenerator
- type RemoteMetaStore
- func (s RemoteMetaStore) Close() error
- func (s RemoteMetaStore) CreateFunction(ctx context.Context, fn *pb.Function) ([]byte, error)
- func (s RemoteMetaStore) CreateLocation(ctx context.Context, l *Location) ([]byte, error)
- func (s RemoteMetaStore) CreateLocationLines(ctx context.Context, locID []byte, lines []LocationLine) error
- func (s RemoteMetaStore) CreateMapping(ctx context.Context, m *pb.Mapping) ([]byte, error)
- func (s RemoteMetaStore) GetFunctionByKey(ctx context.Context, fkey *pb.Function) (*pb.Function, error)
- func (s RemoteMetaStore) GetFunctions(ctx context.Context) ([]*pb.Function, error)
- func (s RemoteMetaStore) GetFunctionsByIDs(ctx context.Context, ids ...[]byte) (map[string]*pb.Function, error)
- func (s RemoteMetaStore) GetLinesByLocationIDs(ctx context.Context, ids ...[]byte) (map[string][]*pb.Line, [][]byte, error)
- func (s RemoteMetaStore) GetLocationByKey(ctx context.Context, lkey *Location) (*pb.Location, error)
- func (s RemoteMetaStore) GetLocations(ctx context.Context) ([]*pb.Location, [][]byte, error)
- func (s RemoteMetaStore) GetLocationsByIDs(ctx context.Context, ids ...[]byte) (map[string]*pb.Location, [][]byte, error)
- func (s RemoteMetaStore) GetMappingByKey(ctx context.Context, mkey *pb.Mapping) (*pb.Mapping, error)
- func (s RemoteMetaStore) GetMappingsByIDs(ctx context.Context, ids ...[]byte) (map[string]*pb.Mapping, error)
- func (s RemoteMetaStore) GetSymbolizableLocations(ctx context.Context) ([]*pb.Location, [][]byte, error)
- func (s RemoteMetaStore) Ping() error
- func (s RemoteMetaStore) Symbolize(ctx context.Context, l *Location) error
- type UUIDGenerator
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetLocationsByIDs ¶ added in v0.5.0
func MakeFunctionKey ¶
func MakeLocationKey ¶
func MakeMappingKey ¶
func UnsymbolizableMapping ¶ added in v0.5.0
UnsymbolizableMapping returns true if a mapping points to a binary for which locations can't be symbolized in principle, at least now. Examples are "[vdso]", [vsyscall]" and some others, see the code.
Types ¶
type BadgerLogger ¶ added in v0.5.0
type BadgerLogger struct {
// contains filtered or unexported fields
}
func (*BadgerLogger) Debugf ¶ added in v0.5.0
func (l *BadgerLogger) Debugf(f string, v ...interface{})
func (*BadgerLogger) Errorf ¶ added in v0.5.0
func (l *BadgerLogger) Errorf(f string, v ...interface{})
func (*BadgerLogger) Infof ¶ added in v0.5.0
func (l *BadgerLogger) Infof(f string, v ...interface{})
func (*BadgerLogger) Warningf ¶ added in v0.5.0
func (l *BadgerLogger) Warningf(f string, v ...interface{})
type BadgerMetastore ¶ added in v0.5.0
type BadgerMetastore struct {
// contains filtered or unexported fields
}
BadgerMetastore is an implementation of the metastore using the badger KV store.
func NewBadgerMetastore ¶ added in v0.5.0
func NewBadgerMetastore( logger log.Logger, reg prometheus.Registerer, tracer trace.Tracer, uuidGenerator UUIDGenerator, ) *BadgerMetastore
NewBadgerMetastore returns a new BadgerMetastore with using in-memory badger instance.
func (*BadgerMetastore) Close ¶ added in v0.5.0
func (m *BadgerMetastore) Close() error
Close closes the badger store.
func (*BadgerMetastore) CreateFunction ¶ added in v0.5.0
CreateFunction creates a new function in the database.
func (*BadgerMetastore) CreateLocation ¶ added in v0.5.0
func (*BadgerMetastore) CreateLocationLines ¶ added in v0.5.0
func (m *BadgerMetastore) CreateLocationLines(ctx context.Context, locID []byte, lines []LocationLine) error
CreateLocationLines writes a set of lines related to a location to the database.
func (*BadgerMetastore) CreateMapping ¶ added in v0.5.0
CreateMapping creates a new mapping in the database.
func (*BadgerMetastore) GetFunctionByKey ¶ added in v0.5.0
func (m *BadgerMetastore) GetFunctionByKey(ctx context.Context, key *pb.Function) (*pb.Function, error)
GetFunctionByKey returns the function for the given key.
func (*BadgerMetastore) GetFunctions ¶ added in v0.5.0
GetFunctions returns all functions in the database.
func (*BadgerMetastore) GetFunctionsByIDs ¶ added in v0.5.0
func (m *BadgerMetastore) GetFunctionsByIDs(ctx context.Context, ids ...[]byte) (map[string]*pb.Function, error)
GetFunctionByID returns the function for the given ID.
func (*BadgerMetastore) GetLinesByLocationIDs ¶ added in v0.5.0
func (m *BadgerMetastore) GetLinesByLocationIDs(ctx context.Context, ids ...[]byte) ( map[string][]*pb.Line, [][]byte, error, )
GetLinesByLocationIDs returns the lines for the given location IDs.
func (*BadgerMetastore) GetLocationByKey ¶ added in v0.5.0
func (*BadgerMetastore) GetLocations ¶ added in v0.5.0
func (*BadgerMetastore) GetLocationsByIDs ¶ added in v0.5.0
func (*BadgerMetastore) GetMappingByKey ¶ added in v0.5.0
func (m *BadgerMetastore) GetMappingByKey(ctx context.Context, key *pb.Mapping) (*pb.Mapping, error)
GetMappingByKey returns the mapping for the given key.
func (*BadgerMetastore) GetMappingsByIDs ¶ added in v0.5.0
func (m *BadgerMetastore) GetMappingsByIDs(ctx context.Context, ids ...[]byte) (map[string]*pb.Mapping, error)
GetMappingsByIDs returns the mappings for the given IDs.
func (*BadgerMetastore) GetSymbolizableLocations ¶ added in v0.5.0
func (*BadgerMetastore) Ping ¶ added in v0.5.0
func (m *BadgerMetastore) Ping() error
Ping returns an error if the metastore is not available.
type FunctionKey ¶
func MakeSQLFunctionKey ¶ added in v0.5.0
func MakeSQLFunctionKey(f *pb.Function) FunctionKey
type FunctionStore ¶
type FunctionStore interface { GetFunctionByKey(ctx context.Context, key *pb.Function) (*pb.Function, error) CreateFunction(ctx context.Context, f *pb.Function) ([]byte, error) GetFunctionsByIDs(ctx context.Context, ids ...[]byte) (map[string]*pb.Function, error) GetFunctions(ctx context.Context) ([]*pb.Function, error) }
type InMemorySQLiteMetaStore ¶
type InMemorySQLiteMetaStore struct {
// contains filtered or unexported fields
}
func NewInMemorySQLiteProfileMetaStore ¶
func NewInMemorySQLiteProfileMetaStore( reg prometheus.Registerer, tracer trace.Tracer, name ...string, ) (*InMemorySQLiteMetaStore, error)
func (InMemorySQLiteMetaStore) CreateFunction ¶
func (InMemorySQLiteMetaStore) CreateLocation ¶
func (InMemorySQLiteMetaStore) CreateLocationLines ¶ added in v0.5.0
func (s InMemorySQLiteMetaStore) CreateLocationLines(ctx context.Context, locID []byte, lines []LocationLine) error
func (InMemorySQLiteMetaStore) CreateMapping ¶
func (InMemorySQLiteMetaStore) GetFunctionByKey ¶
func (InMemorySQLiteMetaStore) GetFunctions ¶
func (InMemorySQLiteMetaStore) GetFunctionsByIDs ¶ added in v0.5.0
func (InMemorySQLiteMetaStore) GetLinesByLocationIDs ¶ added in v0.5.0
func (InMemorySQLiteMetaStore) GetLocationByKey ¶
func (InMemorySQLiteMetaStore) GetLocations ¶
func (InMemorySQLiteMetaStore) GetLocationsByIDs ¶
func (InMemorySQLiteMetaStore) GetMappingByKey ¶
func (InMemorySQLiteMetaStore) GetMappingsByIDs ¶
func (InMemorySQLiteMetaStore) GetSymbolizableLocations ¶
type Location ¶
type Location struct { ID uuid.UUID Address uint64 Mapping *pb.Mapping Lines []LocationLine IsFolded bool }
func GetLocationByKey ¶ added in v0.5.0
func GetLocations ¶ added in v0.5.0
func GetLocations(ctx context.Context, s ProfileMetaStore) ([]*Location, error)
Only used in tests so not as important to be efficient.
func GetSymbolizableLocations ¶ added in v0.5.0
func GetSymbolizableLocations(ctx context.Context, s ProfileMetaStore) ( []*Location, error, )
type LocationKey ¶
func MakeSQLLocationKey ¶ added in v0.5.0
func MakeSQLLocationKey(l *Location) LocationKey
type LocationLine ¶ added in v0.4.0
type LocationLineStore ¶ added in v0.5.0
type LocationStore ¶
type LocationStore interface { GetLocations(ctx context.Context) ([]*pb.Location, [][]byte, error) GetLocationByKey(ctx context.Context, key *Location) (*pb.Location, error) GetLocationsByIDs(ctx context.Context, id ...[]byte) (map[string]*pb.Location, [][]byte, error) CreateLocation(ctx context.Context, l *Location) ([]byte, error) Symbolize(ctx context.Context, location *Location) error GetSymbolizableLocations(ctx context.Context) ([]*pb.Location, [][]byte, error) }
type MappingKey ¶
func MakeSQLMappingKey ¶ added in v0.5.0
func MakeSQLMappingKey(m *pb.Mapping) MappingKey
type MappingStore ¶
type OnDiskSQLiteMetaStore ¶
type OnDiskSQLiteMetaStore struct {
// contains filtered or unexported fields
}
func NewDiskProfileMetaStore ¶
func NewDiskProfileMetaStore( reg prometheus.Registerer, tracer trace.Tracer, path ...string, ) (*OnDiskSQLiteMetaStore, error)
func (OnDiskSQLiteMetaStore) CreateFunction ¶
func (OnDiskSQLiteMetaStore) CreateLocation ¶
func (OnDiskSQLiteMetaStore) CreateLocationLines ¶ added in v0.5.0
func (s OnDiskSQLiteMetaStore) CreateLocationLines(ctx context.Context, locID []byte, lines []LocationLine) error
func (OnDiskSQLiteMetaStore) CreateMapping ¶
func (OnDiskSQLiteMetaStore) GetFunctionByKey ¶
func (OnDiskSQLiteMetaStore) GetFunctions ¶
func (OnDiskSQLiteMetaStore) GetFunctionsByIDs ¶ added in v0.5.0
func (OnDiskSQLiteMetaStore) GetLinesByLocationIDs ¶ added in v0.5.0
func (OnDiskSQLiteMetaStore) GetLocationByKey ¶
func (OnDiskSQLiteMetaStore) GetLocations ¶
func (OnDiskSQLiteMetaStore) GetLocationsByIDs ¶
func (OnDiskSQLiteMetaStore) GetMappingByKey ¶
func (OnDiskSQLiteMetaStore) GetMappingsByIDs ¶
func (OnDiskSQLiteMetaStore) GetSymbolizableLocations ¶
type ProfileMetaStore ¶
type ProfileMetaStore interface { LocationStore LocationLineStore FunctionStore MappingStore Close() error Ping() error }
type RandomUUIDGenerator ¶ added in v0.5.0
type RandomUUIDGenerator struct{}
RandomUUIDGenerator returns a new random UUID.
func (*RandomUUIDGenerator) New ¶ added in v0.5.0
func (g *RandomUUIDGenerator) New() uuid.UUID
New returns a new UUID.
type RemoteMetaStore ¶
type RemoteMetaStore struct {
// contains filtered or unexported fields
}
func NewRemoteProfileMetaStore ¶
func NewRemoteProfileMetaStore(addr string) (*RemoteMetaStore, error)
func (RemoteMetaStore) CreateFunction ¶
func (RemoteMetaStore) CreateLocation ¶
func (RemoteMetaStore) CreateLocationLines ¶ added in v0.5.0
func (s RemoteMetaStore) CreateLocationLines(ctx context.Context, locID []byte, lines []LocationLine) error
func (RemoteMetaStore) CreateMapping ¶
func (RemoteMetaStore) GetFunctionByKey ¶
func (RemoteMetaStore) GetFunctions ¶
func (RemoteMetaStore) GetFunctionsByIDs ¶ added in v0.5.0
func (RemoteMetaStore) GetLinesByLocationIDs ¶ added in v0.5.0
func (RemoteMetaStore) GetLocationByKey ¶
func (RemoteMetaStore) GetLocations ¶
func (RemoteMetaStore) GetLocationsByIDs ¶
func (RemoteMetaStore) GetMappingByKey ¶
func (RemoteMetaStore) GetMappingsByIDs ¶
func (RemoteMetaStore) GetSymbolizableLocations ¶
type UUIDGenerator ¶ added in v0.5.0
UUIDGenerator returns new UUIDs.
func NewRandomUUIDGenerator ¶ added in v0.5.0
func NewRandomUUIDGenerator() UUIDGenerator
NewRandomUUIDGenerator returns a new random UUID generator.