Re: [PATCH] Fix "ps/vm" commands to display the memory usage for exiting tasks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 25, 2023 at 9:15 AM HAGIO KAZUHITO(萩尾 一仁) <k-hagio-ab@xxxxxxx> wrote:
>>> -     if (!task_mm(task, TRUE))
>>> +     if (!(addr = task_mm(task, TRUE)))
>>> +             return;
>>> +
>>> +     if (!readmem(addr + OFFSET(mm_struct_mm_count), KVADDR, &mm_count,
>>> +             sizeof(int), "mm_struct mm_count", RETURN_ON_ERROR))
>>> +             return;

tt->mm_struct is filled in task_mm(), I think we can use this:

   mm_count = INT(tt->mm_struct + OFFSET(mm_struct_mm_count));

The following code in get_task_mem_usage() also use this.

Good idea. I will post v2 with this change later.

Thanks.
Lianbo
 

Thanks,
Kazu
--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility
Contribution Guidelines: https://github.com/crash-utility/crash/wiki

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux