hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/tools/perf/util/namespaces.h
....@@ -1,7 +1,5 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
2
- * This program is free software; you can redistribute it and/or modify
3
- * it under the terms of the GNU General Public License, version 2, as
4
- * published by the Free Software Foundation.
53 *
64 * Copyright (C) 2017 Hari Bathini, IBM Corporation
75 */
....@@ -15,7 +13,11 @@
1513 #include <linux/refcount.h>
1614 #include <linux/types.h>
1715
18
-struct namespaces_event;
16
+#ifndef HAVE_SETNS_SUPPORT
17
+int setns(int fd, int nstype);
18
+#endif
19
+
20
+struct perf_record_namespaces;
1921
2022 struct namespaces {
2123 struct list_head list;
....@@ -23,7 +25,7 @@
2325 struct perf_ns_link_info link_info[];
2426 };
2527
26
-struct namespaces *namespaces__new(struct namespaces_event *event);
28
+struct namespaces *namespaces__new(struct perf_record_namespaces *event);
2729 void namespaces__free(struct namespaces *namespaces);
2830
2931 struct nsinfo {
....@@ -64,4 +66,6 @@
6466
6567 #define nsinfo__zput(nsi) __nsinfo__zput(&nsi)
6668
69
+const char *perf_ns__name(unsigned int id);
70
+
6771 #endif /* __PERF_NAMESPACES_H */