python

package
v0.0.0-...-553deb4 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Overview

Copyright 2023 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.

Copyright 2023 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

func DataMapForInitialState

func DataMapForInitialState(v string) runtimedata.InitialStateMap

func DataMapForLayout

func DataMapForLayout(v string) runtimedata.LayoutMap

func GetInitialStates

func GetInitialStates() (map[runtimedata.Key]*InitialState, error)

GetInitialStates returns all the initial states for the supported versions.

func GetLayout

func GetLayout(v *semver.Version) (runtimedata.Key, runtimedata.RuntimeData, error)

GetLayout returns the matching layout for the given version.

func GetLayouts

func GetLayouts() (map[runtimedata.Key]runtimedata.RuntimeData, error)

GetLayouts returns all the layouts for the supported versions.

Types

type InitialState

type InitialState struct {
	InterpreterHead    int64    `yaml:"interpreter_head"`
	ThreadStateCurrent int64    `yaml:"tstate_current"`
	AutoTSSKey         int64    `yaml:"auto_tss_key"`
	PyTSS              PyTSSKey `yaml:"tss"`
}

The state kept in the static global variables, we read them from the memory directly. Check the agent for more details.

func GetInitialState

func GetInitialState(v *semver.Version) (runtimedata.Key, *InitialState, error)

GetInitialState returns the initial state for the given version.

func GetInitialStateForArch

func GetInitialStateForArch(v *semver.Version, arch string) (runtimedata.Key, *InitialState, error)

func (InitialState) Data

func (i InitialState) Data() ([]byte, error)

type InitialStateWithVersion

type InitialStateWithVersion struct {
	Version      runtimedata.Version `yaml:"version"`
	InitialState InitialState        `yaml:"initial_state"`
}

func WithVersion

func WithVersion(version string, is InitialState) (InitialStateWithVersion, error)

type Layout

type Layout struct {
	PyCFrame           PyCFrame           `yaml:"py_cframe"`
	PyCodeObject       PyCodeObject       `yaml:"py_code_object"`
	PyFrameObject      PyFrameObject      `yaml:"py_frame_object"`
	PyInterpreterState PyInterpreterState `yaml:"py_interpreter_state"`
	PyObject           PyObject           `yaml:"py_object"`
	PyRuntimeState     PyRuntimeState     `yaml:"py_runtime_state"`
	PyString           PyString           `yaml:"py_string"`
	PyThreadState      PyThreadState      `yaml:"py_thread_state"`
	PyTupleObject      PyTupleObject      `yaml:"py_tuple_object"`
	PyTypeObject       PyTypeObject       `yaml:"py_type_object"`
	PyInterpreterFrame PyInterpreterFrame `yaml:"py_interpreter_frame"`
}

func (Layout) Data

func (pvo Layout) Data() ([]byte, error)

type PyCFrame

type PyCFrame struct {
	CurrentFrame int64 `yaml:"current_frame"`
}

PyCFrame

type PyCodeObject

type PyCodeObject struct {
	CoFilename    int64 `yaml:"co_filename"`
	CoName        int64 `yaml:"co_name"`
	CoVarnames    int64 `yaml:"co_varnames"`
	CoFirstlineno int64 `yaml:"co_firstlineno"`
}

PyCodeObject

type PyFrameObject

type PyFrameObject struct {
	FBack       int64 `yaml:"f_back"`
	FCode       int64 `yaml:"f_code"`
	FLineno     int64 `yaml:"f_lineno"`
	FLocalsplus int64 `yaml:"f_localsplus"`
}

PyFrameObject

type PyInterpreterFrame

type PyInterpreterFrame struct {
	Owner int64 `yaml:"owner"`
}

PyInterpreterFrame

type PyInterpreterState

type PyInterpreterState struct {
	TStateHead int64 `yaml:"tstate_head"`
}

PyInterpreterState

type PyObject

type PyObject struct {
	ObType int64 `yaml:"ob_type"`
}

PyObject

type PyRuntimeState

type PyRuntimeState struct {
	InterpMain int64 `yaml:"interp_main"`
}

PyRuntimeState

type PyString

type PyString struct {
	Data int64 `yaml:"data"`
	Size int64 `yaml:"size"`
}

PyString

type PyTSSKey

type PyTSSKey struct {
	Key  int64 `yaml:"key"`
	Size int64 `yaml:"size"`
}

type PyThreadState

type PyThreadState struct {
	Next           int64 `yaml:"next"`
	Interp         int64 `yaml:"interp"`
	Frame          int64 `yaml:"frame"`
	ThreadID       int64 `yaml:"thread_id"`
	NativeThreadID int64 `yaml:"native_thread_id"`
	CFrame         int64 `yaml:"cframe"`
}

PyThreadState

type PyTupleObject

type PyTupleObject struct {
	ObItem int64 `yaml:"ob_item"`
}

PyTupleObject

type PyTypeObject

type PyTypeObject struct {
	TPName int64 `yaml:"tp_name"`
}

PyTypeObject

Jump to

Keyboard shortcuts

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