This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to understand the pid() and new_pid are same value in executing forktracker.stp?


On 10/22/2015 06:29 PM, Nan Xiao wrote:
> I remember in Linux, the process is actually a thread, or LWP, right?
> If it is true, I think the pid() is also tid().

That's what I tried to explain here:

>> Note that we use the POSIX terminology with pid=process and tid=thread,
>> versus the kernel with pid=task-id and tgid=thread-group-id.  Every user
>> thread has a task, and a thread group is roughly a user process.

So stap's pid = task_struct->tgid, and stap's tid = task_struct->pid.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]