Home
last modified time | relevance | path

Searched refs:cgroup (Results 1 – 25 of 28) sorted by relevance

12

/tools/testing/selftests/cgroup/
Dtest_freezer.c29 static int cg_check_frozen(const char *cgroup, bool frozen) in cg_check_frozen() argument
32 if (cg_read_strstr(cgroup, "cgroup.events", "frozen 1") != 0) { in cg_check_frozen()
33 debug("Cgroup %s isn't frozen\n", cgroup); in cg_check_frozen()
40 if (cg_read_strstr(cgroup, "cgroup.events", "frozen 0") != 0) { in cg_check_frozen()
41 debug("Cgroup %s is frozen\n", cgroup); in cg_check_frozen()
52 static int cg_freeze_nowait(const char *cgroup, bool freeze) in cg_freeze_nowait() argument
54 return cg_write(cgroup, "cgroup.freeze", freeze ? "1" : "0"); in cg_freeze_nowait()
60 static int cg_prepare_for_wait(const char *cgroup) in cg_prepare_for_wait() argument
70 ret = inotify_add_watch(fd, cg_control(cgroup, "cgroup.events"), in cg_prepare_for_wait()
116 static int cg_enter_and_wait_for_frozen(const char *cgroup, int pid, in cg_enter_and_wait_for_frozen() argument
[all …]
Dcgroup_util.h21 extern char *cg_control(const char *cgroup, const char *control);
22 extern int cg_create(const char *cgroup);
23 extern int cg_destroy(const char *cgroup);
24 extern int cg_read(const char *cgroup, const char *control,
26 extern int cg_read_strcmp(const char *cgroup, const char *control,
28 extern int cg_read_strstr(const char *cgroup, const char *control,
30 extern long cg_read_long(const char *cgroup, const char *control);
31 long cg_read_key_long(const char *cgroup, const char *control, const char *key);
32 extern int cg_write(const char *cgroup, const char *control, char *buf);
33 extern int cg_run(const char *cgroup,
[all …]
Dcgroup_util.c77 char *cg_control(const char *cgroup, const char *control) in cg_control() argument
79 size_t len = strlen(cgroup) + strlen(control) + 2; in cg_control()
82 snprintf(ret, len, "%s/%s", cgroup, control); in cg_control()
87 int cg_read(const char *cgroup, const char *control, char *buf, size_t len) in cg_read() argument
91 snprintf(path, sizeof(path), "%s/%s", cgroup, control); in cg_read()
99 int cg_read_strcmp(const char *cgroup, const char *control, in cg_read_strcmp() argument
116 if (cg_read(cgroup, control, buf, size)) { in cg_read_strcmp()
126 int cg_read_strstr(const char *cgroup, const char *control, const char *needle) in cg_read_strstr() argument
130 if (cg_read(cgroup, control, buf, sizeof(buf))) in cg_read_strstr()
136 long cg_read_long(const char *cgroup, const char *control) in cg_read_long() argument
[all …]
Dtest_memcontrol.c89 static int alloc_anon_50M_check(const char *cgroup, void *arg) in alloc_anon_50M_check() argument
100 current = cg_read_long(cgroup, "memory.current"); in alloc_anon_50M_check()
107 anon = cg_read_key_long(cgroup, "memory.stat", "anon "); in alloc_anon_50M_check()
120 static int alloc_pagecache_50M_check(const char *cgroup, void *arg) in alloc_pagecache_50M_check() argument
134 current = cg_read_long(cgroup, "memory.current"); in alloc_pagecache_50M_check()
138 file = cg_read_key_long(cgroup, "memory.stat", "file "); in alloc_pagecache_50M_check()
189 static int alloc_pagecache_50M(const char *cgroup, void *arg) in alloc_pagecache_50M() argument
196 static int alloc_pagecache_50M_noexit(const char *cgroup, void *arg) in alloc_pagecache_50M_noexit() argument
210 static int alloc_anon_noexit(const char *cgroup, void *arg) in alloc_anon_noexit() argument
214 if (alloc_anon(cgroup, arg)) in alloc_anon_noexit()
[all …]
/tools/perf/util/
Dcgroup.c94 static struct cgroup *evlist__find_cgroup(struct evlist *evlist, const char *str) in evlist__find_cgroup()
110 static struct cgroup *cgroup__new(const char *name) in cgroup__new()
112 struct cgroup *cgroup = zalloc(sizeof(*cgroup)); in cgroup__new() local
114 if (cgroup != NULL) { in cgroup__new()
115 refcount_set(&cgroup->refcnt, 1); in cgroup__new()
117 cgroup->name = strdup(name); in cgroup__new()
118 if (!cgroup->name) in cgroup__new()
120 cgroup->fd = open_cgroup(name); in cgroup__new()
121 if (cgroup->fd == -1) in cgroup__new()
125 return cgroup; in cgroup__new()
[all …]
Dcgroup.h9 struct cgroup { struct
18 struct cgroup *cgroup__get(struct cgroup *cgroup); argument
19 void cgroup__put(struct cgroup *cgroup);
23 struct cgroup *evlist__findnew_cgroup(struct evlist *evlist, const char *name);
25 void evlist__set_default_cgroup(struct evlist *evlist, struct cgroup *cgroup);
Dpython-ext-sources25 util/cgroup.c
Devsel.h16 struct cgroup;
60 struct cgroup *cgrp;
DBuild79 perf-y += cgroup.o
/tools/bpf/bpftool/Documentation/
Dbpftool-cgroup.rst2 bpftool-cgroup
13 **bpftool** [*OPTIONS*] **cgroup** *COMMAND*
23 | **bpftool** **cgroup { show | list }** *CGROUP* [**effective**]
24 | **bpftool** **cgroup tree** [*CGROUP_ROOT*] [**effective**]
25 | **bpftool** **cgroup attach** *CGROUP* *ATTACH_TYPE* *PROG* [*ATTACH_FLAGS*]
26 | **bpftool** **cgroup detach** *CGROUP* *ATTACH_TYPE* *PROG*
27 | **bpftool** **cgroup help**
38 **bpftool cgroup { show | list }** *CGROUP* [**effective**]
39 List all programs attached to the cgroup *CGROUP*.
45 will execute for events within a cgroup. This includes
[all …]
Dbpftool-prog.rst39 | **tracepoint** | **raw_tracepoint** | **xdp** | **perf_event** | **cgroup/skb** |
40 | **cgroup/sock** | **cgroup/dev** | **lwt_in** | **lwt_out** | **lwt_xmit** |
42 | **cgroup/bind4** | **cgroup/bind6** | **cgroup/post_bind4** | **cgroup/post_bind6** |
43 | **cgroup/connect4** | **cgroup/connect6** | **cgroup/sendmsg4** | **cgroup/sendmsg6** |
44 | **cgroup/recvmsg4** | **cgroup/recvmsg6** | **cgroup/sysctl** |
45 | **cgroup/getsockopt** | **cgroup/setsockopt**
311 **bpftool-cgroup**\ (8),
Dbpftool.rst19 *OBJECT* := { **map** | **program** | **cgroup** | **perf** | **net** | **feature** }
80 **bpftool-cgroup**\ (8),
Dbpftool-net.rst40 For programs attached to a particular cgroup, e.g.,
43 users can use **bpftool cgroup** to dump cgroup attachments.
199 **bpftool-cgroup**\ (8),
Dbpftool-perf.rst90 **bpftool-cgroup**\ (8),
Dbpftool-feature.rst87 **bpftool-cgroup**\ (8),
Dbpftool-btf.rst235 **bpftool-cgroup**\ (8),
/tools/bpf/bpftool/bash-completion/
Dbpftool385 xdp perf_event cgroup/skb cgroup/sock \
386 cgroup/dev lwt_in lwt_out lwt_xmit \
388 lirc_mode2 cgroup/bind4 cgroup/bind6 \
389 cgroup/connect4 cgroup/connect6 \
390 cgroup/sendmsg4 cgroup/sendmsg6 \
391 cgroup/recvmsg4 cgroup/recvmsg6 \
392 cgroup/post_bind4 cgroup/post_bind6 \
393 cgroup/sysctl cgroup/getsockopt \
394 cgroup/setsockopt" -- \
719 cgroup)
/tools/vm/
Dpage-types.c372 uint64_t cgroup, uint64_t mapcnt) in show_page_range() argument
381 if (flags == flags0 && cgroup == cgroup0 && mapcnt == mapcnt0 && in show_page_range()
401 cgroup0 = cgroup; in show_page_range()
414 uint64_t flags, uint64_t cgroup, uint64_t mapcnt) in show_page() argument
421 printf("@%llu\t", (unsigned long long)cgroup); in show_page()
632 uint64_t flags, uint64_t cgroup, uint64_t mapcnt, in add_page() argument
640 if (opt_cgroup && cgroup != (uint64_t)opt_cgroup) in add_page()
652 show_page_range(voffset, offset, 1, flags, cgroup, mapcnt); in add_page()
654 show_page(voffset, offset, flags, cgroup, mapcnt); in add_page()
972 uint64_t cgroup = 0; in walk_file() local
[all …]
/tools/perf/Documentation/
Dperf-trace.txt67 --cgroup::
68 Record events in threads in a cgroup.
70 Look for cgroups to set at the /sys/fs/cgroup/perf_event directory, then
71 remove the /sys/fs/cgroup/perf_event/ part and try:
76 _and_ sched:sched_switch to the 'A' cgroup, while:
80 will only set the sched:sched_switch event to the 'A' cgroup, all the
82 a cgroup (on the root cgroup, sys wide, etc).
88 the syscall ones go to the 'A' cgroup, the sched:sched_switch goes
89 to the 'B' cgroup.
Dperf-stat.txt139 --cgroup name::
140 monitor only in the container (cgroup) called "name". This option is available only
141 in per-cpu mode. The cgroup filesystem must be mounted. All threads belonging to
143 can be provided. Each cgroup is applied to the corresponding event, i.e., first cgroup
144 to first event, second cgroup to second event and so on. It is possible to provide
145 an empty cgroup (monitor all the time) using, e.g., -G foo,,bar. Cgroups must have
147 line. If the user wants to track multiple events for a specific cgroup, the user can
150 If wanting to monitor, say, 'cycles' for a cgroup and also for system wide, this
Dperf-record.txt329 --cgroup name,...::
330 monitor only in the container (cgroup) called "name". This option is available only
331 in per-cpu mode. The cgroup filesystem must be mounted. All threads belonging to
333 can be provided. Each cgroup is applied to the corresponding event, i.e., first cgroup
334 to first event, second cgroup to second event and so on. It is possible to provide
335 an empty cgroup (monitor all the time) using, e.g., -G foo,,bar. Cgroups must have
337 line. If the user wants to track multiple events for a specific cgroup, the user can
340 If wanting to monitor, say, 'cycles' for a cgroup and also for system wide, this
/tools/
DMakefile66 cgroup firewire hv guest spi usb virtio vm bpf iio gpio objtool leds wmi pci firmware debugging: FO… target
98 all: acpi cgroup cpupower gpio hv firewire liblockdep \
/tools/cgroup/
Diocost_monitor.py65 return blkcg.css.cgroup.kn.name.string_().decode('utf-8')
217 if args.cgroup:
218 for r in args.cgroup:
/tools/testing/selftests/
DMakefile6 TARGETS += cgroup
/tools/perf/
Dbuiltin-trace.c114 struct cgroup *cgroup; member
3331 if (trace->cgroup) in trace__run()
3332 evlist__set_default_cgroup(trace->evlist, trace->cgroup); in trace__run()
3517 cgroup__put(trace->cgroup); in trace__run()
4001 trace->cgroup = evlist__findnew_cgroup(trace->evlist, str); in trace__parse_cgroups()
4213 if ((nr_cgroups || trace.cgroup) && !trace.opts.target.system_wide) { in cmd_trace()

12