Applied, thanks! Sergey Bugaev, le mar. 18 avril 2023 13:49:02 +0300, a ecrit: > This was always showing up as 0, because apparently we need to query > creation_time for the task, not a thread. > > Here's a before vs after comparison: > > $ cat /proc/self/stat ~/procfs/self/stat > 11151 (cat) S 26571 11151 26571 0 0 0 0 0 0 0 1 0 0 0 20 0 2 0 0 154783744 > 251 0 134443008 134477480 0 0 0 0 0 0 0 21001 0 0 0 0 0 0 0 > 11151 (cat) S 26571 11151 26571 0 0 0 0 0 0 0 1 0 0 0 20 0 2 0 168174516295 > 154783744 260 0 134443008 134477480 0 0 0 0 0 0 0 21001 0 0 0 0 0 0 0 > --- > procfs/process.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/procfs/process.c b/procfs/process.c > index a9ba51ab..eaf5f45b 100644 > --- a/procfs/process.c > +++ b/procfs/process.c > @@ -286,7 +286,7 @@ process_file_gc_stat (struct proc_stat *ps, char > **contents) > MACH_PRIORITY_TO_NICE(thbi->base_priority) + 20, > MACH_PRIORITY_TO_NICE(thbi->base_priority), > pi->nthreads, 0L, > - timeval_jiffies (thbi->creation_time), /* FIXME: ... since boot */ > + timeval_jiffies (tbi->creation_time), /* FIXME: ... since boot */ > (long unsigned) tbi->virtual_size, > (long unsigned) tbi->resident_size / PAGE_SIZE, 0L, > start_code, > -- > 2.39.2 > >
-- Samuel --- Pour une évaluation indépendante, transparente et rigoureuse ! Je soutiens la Commission d'Évaluation de l'Inria.