Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def main(argv: list[str] | None = None) -> int:
sys.stderr.write("Usage: python -m codetracer_python_recorder [codetracer options] <script.py> [args...]\n")
return 2

script_path = Path(unknown[0])
script_path = Path(unknown[0]).resolve()
script_args = unknown[1:]

fmt = ns.format or DEFAULT_FORMAT
Expand All @@ -71,7 +71,7 @@ def main(argv: list[str] | None = None) -> int:
start_on_enter=script_path,
)
try:
runpy.run_path(str(script_path.resolve()), run_name="__main__")
runpy.run_path(str(script_path), run_name="__main__")
return 0
except SystemExit as e:
# Preserve script's exit code
Expand Down
1 change: 1 addition & 0 deletions codetracer-python-recorder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ fn start_tracing(

// Start location: prefer activation path, otherwise best-effort argv[0]
let start_path: &Path = activation_path.unwrap_or(Path::new(&program));
log::debug!("{}", start_path.display());
tracer.begin(&meta_path, &paths_path, &events_path, start_path, 1)?;

// Install callbacks
Expand Down
2 changes: 1 addition & 1 deletion codetracer-python-recorder/src/runtime_tracer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl Tracer for RuntimeTracer {
}
// Determine whether this is the activation owner's return
let is_activation_return = self.activation_code_id.map(|id| id == code.id()).unwrap_or(false);
// Return value is optional per configuration

let val = self.encode_value(py, retval);
TraceWriter::register_return(&mut self.writer, val);
if is_activation_return {
Expand Down