devlib icon indicating copy to clipboard operation
devlib copied to clipboard

cgroups: Add support to dump fake attach events

Open joelagnel opened this issue 8 years ago • 7 comments

With this its possible for users to dump the initial cgroup state into the traces with something like the following:

cgroup = te.target.cgroups.controllers['cpuset'].cgroup('/foreground') cgroup.trace_cgroup_tasks()

Signed-off-by: Joel Fernandes [email protected]

joelagnel avatar Jun 20 '17 23:06 joelagnel

CC @derkling @bjackman

joelagnel avatar Jun 20 '17 23:06 joelagnel

The shutil and trace_cgroup_tasks look good to me.

I don't understand why create_existing_cgroups is added? I might be being slow here...

Also could you add a docstring explaining what trace_existing_cgroups does?

bjackman avatar Jun 21 '17 14:06 bjackman

I think it would work without this too. But it made sense to me to pre create the cgroup. Now that you mention this I am thinking I'll drop it and just build it later.

joelagnel avatar Jun 21 '17 16:06 joelagnel

@derkling please merge this?

joelagnel avatar Jun 27 '17 03:06 joelagnel

Hi @joelagnel, you can find here: derkling:review-joel-for-cgroup-attach a series with few patches I've added on top of the one of this PR.

Modifications:

  • fixup! cgroups: Add support to dump fake attach events This should be squased into your own... it brings few updates on your original patch
  • cgroups: add high level API for controller/cgroups tracing Introduces the high-level API I've suggested in one of my previous comments
  • Revert "ssh: Combine exit code and main command" This reverts an optimisation by @bjackman , I would not add it to your PR, since it's not affecting Android targets... but I needed it to test on my Juno/Linux target.

Please give a try to these new bits... especially the high-level API.

derkling avatar Jul 13 '17 15:07 derkling

@derkling @joelagnel @bjackman what is the state of this PR? Is this still needed? Are there more changes coming?

setrofim avatar Sep 11 '17 12:09 setrofim

These are needed. I will squash Patrick's fixup patch into mine and submit it, sorry about the delay. This PR was already in our tree and is being used for some time without the need for the high level API.

On Sep 11, 2017 8:33 AM, "setrofim" [email protected] wrote:

@derkling https://github.com/derkling @joelagnel https://github.com/joelagnel @bjackman https://github.com/bjackman what is the state of this PR? Is this still needed? Are there more changes coming?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ARM-software/devlib/pull/135#issuecomment-328514857, or mute the thread https://github.com/notifications/unsubscribe-auth/AACSVAJPe401Xk6RVPdc4Ipi4b43Uzb6ks5shSiGgaJpZM4OAQq1 .

joelagnel avatar Sep 12 '17 23:09 joelagnel