linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] tracing: Adding cgroup aware tracing functionality
@ 2011-04-06 18:50 Vaibhav Nagarnaik
  2011-04-07  1:33 ` Frederic Weisbecker
  0 siblings, 1 reply; 20+ messages in thread
From: Vaibhav Nagarnaik @ 2011-04-06 18:50 UTC (permalink / raw)
  To: Paul Menage, Li Zefan, Stephane Eranian, Andrew Morton,
	Steven Rostedt, Frederic Weisbecker
  Cc: linux-kernel, containers

All

The cgroup functionality is being used widely in different scenarios. It also
is being integrated with other parts of kernel to take advantage of its
features. One of the areas that is not yet aware of cgroup functionality is
the ftrace framework.

Although ftrace provides a way to filter based on PIDs of tasks to be traced,
it is restricted to specific tracers, like function tracer. Also it becomes
difficult to keep track of all PIDs in a dynamic environment with processes
being created and destroyed in a short amount of time.

An application that creates many processes/tasks is convenient to track and
control with cgroups, but it is difficult to track these processes for the
purposes of tracing. And if child processes are moved to another cgroup, it
makes sense to trace only the original cgroup.

This proposal is to create a file in the tracing directory called
set_trace_cgroup to which a user can write the path of an active cgroup, one
at a time. If no cgroups are specified, no filtering is done and all tasks are
traced. When a cgroup path is added in, it sets a boolean tracing_enabled for
the enabled cgroup in all the hierarchies, which enables tracing for all the
assigned tasks under the specified cgroup.

Though creating a new file in the directory is not desirable, but this
interface seems the most appropriate change required to implement the new
feature.

This tracing_enabled flag is also exported in the cgroupfs directory structure
which can be turned on/off for a specific hierarchy/cgroup combination. This
gives control to enable/disable tracing over a cgroup in a specific hierarchy
only.

This gives more fine-grained control over the tasks being traced. I would like
to know your thoughts on this interface and the approach to make tracing
cgroup aware.


Thanks

Vaibhav Nagarnaik

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2011-04-12 21:38 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-06 18:50 [RFC] tracing: Adding cgroup aware tracing functionality Vaibhav Nagarnaik
2011-04-07  1:33 ` Frederic Weisbecker
2011-04-07  3:17   ` Vaibhav Nagarnaik
2011-04-07 12:06     ` Frederic Weisbecker
2011-04-07 20:22       ` David Sharp
2011-04-07 21:32         ` Frederic Weisbecker
2011-04-07 22:42           ` David Sharp
2011-04-08  0:28             ` Frederic Weisbecker
2011-04-08  7:37               ` Steven Rostedt
2011-04-08 13:45                 ` Frederic Weisbecker
2011-04-08 14:07                   ` Peter Zijlstra
2011-04-08 18:32                     ` Michael Rubin
2011-04-08 20:27                       ` Justin TerAvest
2011-04-08 14:07                 ` Peter Zijlstra
2011-04-08 17:02                   ` Steven Rostedt
2011-04-09 11:08                     ` Peter Zijlstra
2011-04-08 19:00                 ` Frederic Weisbecker
2011-04-08 20:38                   ` Frederic Weisbecker
2011-04-08 21:41                     ` David Sharp
2011-04-12 21:38                       ` Frederic Weisbecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).