Skip to content

Commit

Permalink
trace-read: do not modify timestamps in ftrace events
Browse files Browse the repository at this point in the history
We're about to allow multiple files to be loaded and we need to have a
common time base for all files. Relative timestamps local to a file
won't work.
  • Loading branch information
llandwerlin-intel authored and mikesart committed Feb 18, 2020
1 parent 8331ab7 commit 93f2f67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gpuvis_ftrace_print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ void TraceEvents::new_event_ftrace_print( trace_event_t &event )

if ( bufvar == bufvar_ltime )
{
event.ts = atoll( var_ltime ) - m_trace_info.min_file_ts;
event.ts = atoll( var_ltime );

// Remove "ltime=XXX", etc from buf
buf = trim_ftrace_print_buf( newbuf, buf, var_ltime, s_buf_vars[ bufvar ].len );
Expand Down
2 changes: 1 addition & 1 deletion src/trace-cmd/trace-read.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1648,7 +1648,7 @@ static int trace_enum_events( trace_data_t &trace_data, tracecmd_input_t *handle

trace_event.pid = pid;
trace_event.cpu = record->cpu;
trace_event.ts = record->ts - trace_data.trace_info.min_file_ts;
trace_event.ts = record->ts;

trace_event.comm = strpool.getstrf( "%s-%u", comm, pid );

Expand Down

0 comments on commit 93f2f67

Please sign in to comment.