@@ -204,12 +204,19 @@ func (pt *ProcessTree) FeedFromFork(feed *ForkFeed) error {
204
204
205
205
type ExecFeed struct {
206
206
TimeStamp uint64
207
+ StartTime uint64
207
208
Inode uint64
208
209
Ctime uint64
209
210
CmdPath string
210
211
PathName string
211
212
Interp string
212
213
StdinPath string
214
+ Pid int32
215
+ Tid int32
216
+ PPid int32
217
+ HostPid int32
218
+ HostTid int32
219
+ HostPPid int32
213
220
TaskHash uint32
214
221
ParentHash uint32
215
222
LeaderHash uint32
@@ -258,10 +265,26 @@ func (pt *ProcessTree) FeedFromExec(feed *ExecFeed) error {
258
265
execTimestamp := traceetime .NsSinceEpochToTime (feed .TimeStamp )
259
266
basename := filepath .Base (feed .CmdPath )
260
267
comm := string ([]byte (basename [:min (len (basename ), COMM_LEN )]))
261
- process .GetInfo ().SetNameAt (
262
- comm ,
263
- execTimestamp ,
264
- )
268
+
269
+ // NOTE: override all the fields of the taskInfoFeed, to avoid any previous data.
270
+ taskFeed := pt .GetTaskInfoFeedFromPool ()
271
+
272
+ taskFeed .StartTimeNS = feed .StartTime
273
+ taskFeed .ExitTimeNS = 0
274
+ taskFeed .Name = comm
275
+ taskFeed .NsTid = feed .Tid
276
+ taskFeed .NsPid = feed .Pid
277
+ taskFeed .NsPPid = feed .PPid
278
+ taskFeed .Tid = feed .HostTid
279
+ taskFeed .Pid = feed .HostPid
280
+ taskFeed .PPid = feed .HostPPid
281
+ taskFeed .Uid = math .MaxUint32
282
+ taskFeed .Gid = math .MaxUint32
283
+
284
+ process .GetInfo ().SetFeedAt (taskFeed , execTimestamp )
285
+
286
+ // Release the feed back to the pool as soon as it is not needed anymore
287
+ pt .PutTaskInfoFeedInPool (taskFeed )
265
288
266
289
// NOTE: override all the fields of the fileInfoFeed, to avoid any previous data.
267
290
fileInfoFeed := pt .GetFileInfoFeedFromPool ()
0 commit comments