From 01573e231f18eb2d99162747186f59511f56b64d Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Fri, 08 Dec 2023 10:40:48 +0000 Subject: [PATCH] 移去rt --- kernel/tools/perf/util/trace-event-info.c | 38 +++++++++++--------------------------- 1 files changed, 11 insertions(+), 27 deletions(-) diff --git a/kernel/tools/perf/util/trace-event-info.c b/kernel/tools/perf/util/trace-event-info.c index 8ad8e75..0e5c478 100644 --- a/kernel/tools/perf/util/trace-event-info.c +++ b/kernel/tools/perf/util/trace-event-info.c @@ -1,24 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2008,2009, Steven Rostedt <srostedt@redhat.com> - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License (not later!) - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#include "util.h" #include <dirent.h> #include <mntent.h> #include <stdio.h> @@ -34,8 +17,9 @@ #include <stdbool.h> #include <linux/list.h> #include <linux/kernel.h> +#include <linux/zalloc.h> +#include <internal/lib.h> // page_size -#include "../perf.h" #include "trace-event.h" #include <api/fs/tracing_path.h> #include "evsel.h" @@ -420,11 +404,11 @@ get_tracepoints_path(struct list_head *pattrs) { struct tracepoint_path path, *ppath = &path; - struct perf_evsel *pos; + struct evsel *pos; int nr_tracepoints = 0; - list_for_each_entry(pos, pattrs, node) { - if (pos->attr.type != PERF_TYPE_TRACEPOINT) + list_for_each_entry(pos, pattrs, core.node) { + if (pos->core.attr.type != PERF_TYPE_TRACEPOINT) continue; ++nr_tracepoints; @@ -440,11 +424,11 @@ } try_id: - ppath->next = tracepoint_id_to_path(pos->attr.config); + ppath->next = tracepoint_id_to_path(pos->core.attr.config); if (!ppath->next) { error: pr_debug("No memory to alloc tracepoints list\n"); - put_tracepoints_path(&path); + put_tracepoints_path(path.next); return NULL; } next: @@ -456,10 +440,10 @@ bool have_tracepoints(struct list_head *pattrs) { - struct perf_evsel *pos; + struct evsel *pos; - list_for_each_entry(pos, pattrs, node) - if (pos->attr.type == PERF_TYPE_TRACEPOINT) + list_for_each_entry(pos, pattrs, core.node) + if (pos->core.attr.type == PERF_TYPE_TRACEPOINT) return true; return false; -- Gitblit v1.6.2