From: William C. <wc...@nc...> - 2002-11-19 16:58:44
|
I looked throught the code for do_exit() and what it calls related to the profiling. It turns out that __exit_mm() ends up calling profile_exit_mmap() in do_exit(). Wouldn't that make the profile_exit_task() redundant? Below is a diagram of the call chains to get from do_exit() to the profile_exit_task() and profile_exit_mmap() functions. Each indentation is a call. do_exit() ... profile_exit_task(tsk); ... __exit_mm(tsk); mmput(mm); exit_mmap(); profile_exit_mmap() There is still a fair amount of code that happens after the __exit_mm(). Could the __exit_mm() be moved later in the do_exit()? -Will William Cohen wrote: > John Levon wrote: > >> On Mon, Nov 18, 2002 at 05:29:27PM -0500, William Cohen wrote: >> >> >>> The general premise is if any memory mapping information appears to >>> be going away flush the per cpu sample buffer and convert the data >>> into a more permanent form. This occurs when there the process exits, >>> mmap operation, or unmap operation. The exit verion is handled by >>> exit_task_notify(). Both mm operations are handled by mm_notify(). Both >> >> >> >> No, the exit is different. It is required (the other flushes are merely >> for more accurate profiles, and not strictly needed as such). The >> buffers contain task_struct *, and we must ensure that at >> free(task_struct) time there are exactly 0 references to that struct in >> any of the buffers. >> >> regards >> john >> > > Yes, OProfile needs to make sure there are absolutely no reference to > the task_struct * that has been removed. When exactly does the > task_struct * go away? Before or after exit_mmap()? If the task_struct * > goes away after mm/mm.c:exit_mmap(), then wouldn't the mm_notify() be > sufficient and exit_task_notify() be unneeded? > > -Will > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: To learn the basics of securing your > web site with SSL, click here to get a FREE TRIAL of a Thawte Server > Certificate: http://www.gothawte.com/rd524.html > _______________________________________________ > oprofile-list mailing list > opr...@li... > https://lists.sourceforge.net/lists/listinfo/oprofile-list > |