mirror of
https://github.com/eunomia-bpf/bpf-developer-tutorial.git
synced 2026-02-10 21:55:12 +08:00
fix: Ensure CUPTI flushes events before stopping CPU profiler; update timestamp handling to use microseconds
This commit is contained in:
@@ -184,6 +184,10 @@ class GPUPerf:
|
||||
print(f"Error running command: {e}", file=sys.stderr)
|
||||
return_code = 1
|
||||
finally:
|
||||
# Give CUPTI time to flush remaining buffered events
|
||||
# CUPTI may continue recording events after target exits
|
||||
time.sleep(0.5)
|
||||
|
||||
# Stop CPU profiler if running
|
||||
self.stop_cpu_profiler()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user