OSDN Git Service

perf cgroup: Rename 'struct cgroup_sel' to 'struct cgroup'
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 6 Mar 2018 12:51:48 +0000 (09:51 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 7 Mar 2018 13:22:25 +0000 (10:22 -0300)
That name isn't used, is shorter, lets switch to it.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-e51yphwgvepd1y4f5fjptmjq@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/cgroup.c
tools/perf/util/cgroup.h
tools/perf/util/evsel.h

index 2e2aa6c..6ce291f 100644 (file)
@@ -93,7 +93,7 @@ static int open_cgroup(char *name)
 static int add_cgroup(struct perf_evlist *evlist, char *str)
 {
        struct perf_evsel *counter;
-       struct cgroup_sel *cgrp = NULL;
+       struct cgroup *cgrp = NULL;
        int n;
        /*
         * check if cgrp is already defined, if so we reuse it
@@ -144,7 +144,7 @@ found:
        return 0;
 }
 
-void close_cgroup(struct cgroup_sel *cgrp)
+void close_cgroup(struct cgroup *cgrp)
 {
        if (cgrp && refcount_dec_and_test(&cgrp->refcnt)) {
                close(cgrp->fd);
@@ -158,7 +158,7 @@ int parse_cgroups(const struct option *opt, const char *str,
 {
        struct perf_evlist *evlist = *(struct perf_evlist **)opt->value;
        struct perf_evsel *counter;
-       struct cgroup_sel *cgrp = NULL;
+       struct cgroup *cgrp = NULL;
        const char *p, *e, *eos = str + strlen(str);
        char *s;
        int ret, i;
index afafc87..934daa8 100644 (file)
@@ -6,7 +6,7 @@
 
 struct option;
 
-struct cgroup_sel {
+struct cgroup {
        char *name;
        int fd;
        refcount_t refcnt;
@@ -14,7 +14,8 @@ struct cgroup_sel {
 
 
 extern int nr_cgroups; /* number of explicit cgroups defined */
-void close_cgroup(struct cgroup_sel *cgrp);
+void close_cgroup(struct cgroup *cgrp);
+
 int parse_cgroups(const struct option *opt, const char *str, int unset);
 
 #endif /* __CGROUP_H__ */
index a7487c6..92ba001 100644 (file)
@@ -30,7 +30,7 @@ struct perf_sample_id {
        u64                     period;
 };
 
-struct cgroup_sel;
+struct cgroup;
 
 /*
  * The 'struct perf_evsel_config_term' is used to pass event
@@ -107,7 +107,7 @@ struct perf_evsel {
        struct perf_stat_evsel  *stats;
        void                    *priv;
        u64                     db_id;
-       struct cgroup_sel       *cgrp;
+       struct cgroup           *cgrp;
        void                    *handler;
        struct cpu_map          *cpus;
        struct cpu_map          *own_cpus;