projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup: Remove deprecated TODO file
[lttng-modules.git]
/
instrumentation
/
syscalls
/
lttng-syscalls-extractor
/
lttng-syscalls-extractor.c
diff --git
a/instrumentation/syscalls/lttng-syscalls-extractor/lttng-syscalls-extractor.c
b/instrumentation/syscalls/lttng-syscalls-extractor/lttng-syscalls-extractor.c
index 06c0da13cad280e4ddb1cf0e4d1200bd4bfaf0ab..0f683750a49673742db9b1cd8f2ac572a97357ac 100644
(file)
--- a/
instrumentation/syscalls/lttng-syscalls-extractor/lttng-syscalls-extractor.c
+++ b/
instrumentation/syscalls/lttng-syscalls-extractor/lttng-syscalls-extractor.c
@@
-1,10
+1,11
@@
-/*
- *
Copyright 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
Copyright 2011 - Julien Desfossez <julien.desfossez@polymtl.ca>
+/*
SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
+ *
+ *
lttng-syscalls-extractor.c
*
* Dump syscall metadata to console.
*
*
* Dump syscall metadata to console.
*
- * GPLv2 license.
+ * Copyright 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2011 Julien Desfossez <julien.desfossez@polymtl.ca>
*/
#include <linux/module.h>
*/
#include <linux/module.h>
@@
-15,8
+16,9
@@
#include <linux/slab.h>
#include <linux/kallsyms.h>
#include <linux/dcache.h>
#include <linux/slab.h>
#include <linux/kallsyms.h>
#include <linux/dcache.h>
-#include <linux/
ftrace_event
.h>
+#include <linux/
trace_events
.h>
#include <trace/syscall.h>
#include <trace/syscall.h>
+#include <asm/syscall.h>
#ifndef CONFIG_FTRACE_SYSCALLS
#error "You need to set CONFIG_FTRACE_SYSCALLS=y"
#ifndef CONFIG_FTRACE_SYSCALLS
#error "You need to set CONFIG_FTRACE_SYSCALLS=y"
@@
-26,6
+28,13
@@
#error "You need to set CONFIG_KALLSYMS_ALL=y"
#endif
#error "You need to set CONFIG_KALLSYMS_ALL=y"
#endif
+/*
+ * The 'ident' parameter is prepended to each printk line to help
+ * extract the proper lines from dmesg.
+ */
+static char *ident = "";
+module_param(ident, charp, 0);
+
static struct syscall_metadata **__start_syscalls_metadata;
static struct syscall_metadata **__stop_syscalls_metadata;
static struct syscall_metadata **__start_syscalls_metadata;
static struct syscall_metadata **__stop_syscalls_metadata;
@@
-50,36
+59,40
@@
int init_module(void)
__start_syscalls_metadata = (void *) kallsyms_lookup_name("__start_syscalls_metadata");
__stop_syscalls_metadata = (void *) kallsyms_lookup_name("__stop_syscalls_metadata");
__start_syscalls_metadata = (void *) kallsyms_lookup_name("__start_syscalls_metadata");
__stop_syscalls_metadata = (void *) kallsyms_lookup_name("__stop_syscalls_metadata");
+ printk("%s---START---\n", ident);
for (i = 0; i < NR_syscalls; i++) {
int j;
meta = find_syscall_meta(i);
if (!meta)
continue;
for (i = 0; i < NR_syscalls; i++) {
int j;
meta = find_syscall_meta(i);
if (!meta)
continue;
- printk("syscall %s nr %d nbargs %d ",
- meta->name, meta->syscall_nr, meta->nb_args);
- printk("types: (");
+ printk("
%s
syscall %s nr %d nbargs %d ",
+
ident,
meta->name, meta->syscall_nr, meta->nb_args);
+ printk(
KERN_CONT
"types: (");
for (j = 0; j < meta->nb_args; j++) {
if (j > 0)
for (j = 0; j < meta->nb_args; j++) {
if (j > 0)
- printk(", ");
- printk("%s", meta->types[j]);
+ printk(
KERN_CONT
", ");
+ printk(
KERN_CONT
"%s", meta->types[j]);
}
}
- printk(") ");
- printk("args: (");
+ printk(
KERN_CONT
") ");
+ printk(
KERN_CONT
"args: (");
for (j = 0; j < meta->nb_args; j++) {
if (j > 0)
for (j = 0; j < meta->nb_args; j++) {
if (j > 0)
- printk(", ");
- printk("%s", meta->args[j]);
+ printk(
KERN_CONT
", ");
+ printk(
KERN_CONT
"%s", meta->args[j]);
}
}
- printk(")\n");
+ printk(
KERN_CONT
")\n");
}
}
- printk("
SUCCESS\n"
);
+ printk("
%s---END---\n", ident
);
+ /*
+ * This module always fails to load.
+ */
return -1;
}
void cleanup_module(void)
{
return -1;
}
void cleanup_module(void)
{
-}
+}
MODULE_LICENSE("GPL");
MODULE_LICENSE("GPL");
This page took
0.025136 seconds
and
4
git commands to generate.