On Tue, 2010-09-21 at 15:38 +0200, Stephane Eranian wrote: > > Hmm, indeed. One thing we can do about that is move perf into the > > cgroup, create the counter (disabled) using self to identify the cgroup, > > move perf back to where it came from, and enable the counter. > > > Yes, that's another possibility. I wonder if there are any non-obvious > difficulties with this approach.
Yes, there is, but I think we can fix it. The problem with moving perf itself around is that perf is not a fully dormant process and can thus interact with the cgroup state. If we were to fork a child that's simply sitting idle in waitpid() (or any other blocking syscall) we can move that around cgroup without affecting the cgroup itself. > Is it as simple as: > FILE *fp; > fp = fopen("/dev/cgroup/test/tasks", "w"); > fprintf(fp, "%d", gettid()); > close(fp): Except I've never in my life mounted a cgroup filesystem in /dev/ :-) ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel