mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
perf evlist: Add perf_evlist__remove()
Add a counterpart to perf_evlist__add() that does the opposite and deletes the evsel. This will be used by perf inject to remove unwanted evsels. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/1443186956-18718-23-git-send-email-adrian.hunter@intel.com [ Renamed it from perf_evlist__del() to perf_evlist__remove() and removed the perf_evsel__delete() call ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
dddcf6abbf
commit
4768230ad5
@ -165,6 +165,13 @@ void perf_evlist__add(struct perf_evlist *evlist, struct perf_evsel *entry)
|
||||
__perf_evlist__propagate_maps(evlist, entry);
|
||||
}
|
||||
|
||||
void perf_evlist__remove(struct perf_evlist *evlist, struct perf_evsel *evsel)
|
||||
{
|
||||
evsel->evlist = NULL;
|
||||
list_del_init(&evsel->node);
|
||||
evlist->nr_entries -= 1;
|
||||
}
|
||||
|
||||
void perf_evlist__splice_list_tail(struct perf_evlist *evlist,
|
||||
struct list_head *list)
|
||||
{
|
||||
|
@ -73,6 +73,7 @@ void perf_evlist__exit(struct perf_evlist *evlist);
|
||||
void perf_evlist__delete(struct perf_evlist *evlist);
|
||||
|
||||
void perf_evlist__add(struct perf_evlist *evlist, struct perf_evsel *entry);
|
||||
void perf_evlist__remove(struct perf_evlist *evlist, struct perf_evsel *evsel);
|
||||
int perf_evlist__add_default(struct perf_evlist *evlist);
|
||||
int __perf_evlist__add_default_attrs(struct perf_evlist *evlist,
|
||||
struct perf_event_attr *attrs, size_t nr_attrs);
|
||||
|
Loading…
Reference in New Issue
Block a user