From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Dominik Brodowski <linux@dominikbrodowski.net>
Subject: Re: [PATCH] tracing/x86: Update syscall trace events to handle new x86 syscall func names
Date: Tue, 17 Apr 2018 13:35:27 -0300 [thread overview]
Message-ID: <20180417163527.GA7775@kernel.org> (raw)
In-Reply-To: <20180417115440.2145f7f5@gandalf.local.home>
Em Tue, Apr 17, 2018 at 11:54:40AM -0400, Steven Rostedt escreveu:
> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
>
> Arnaldo noticed that the latest kernel is missing the syscall event system
> directory in x86. I bisected it down to d5a00528b58c ("syscalls/core,
> syscalls/x86: Rename struct pt_regs-based sys_*() to __x64_sys_*()").
>
> The system call trace events are special, as there is only one trace event
> for all system calls (the raw_syscalls). But a macro that wraps the system
> calls creates meta data for them that copies the name to find the system
> call that maps to the system call table (the number). At boot up, it does a
> kallsyms lookup for this mapping. If it does not find a function, then that
> system call is ignored.
>
> Because the x86 system calls had "__x86_" appended to the "sys" for the
> names, they do not match the default compare algorithm. As this was a
> problem for power pc, the algorithm can be overwritten by the architecture.
> The solution is to have x86 have its own algorithm to do the compare and
> this brings back the system call trace events.
>
> Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> Fixes: d5a00528b58c ("syscalls/core, syscalls/x86: Rename struct pt_regs-based sys_*() to __x64_sys_*()")
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
[root@jouet ~]# perf test openat
2: Detect openat syscall event : Ok
3: Detect openat syscall event on all cpus : Ok
15: syscalls:sys_enter_openat event fields : Ok
[root@jouet ~]#
[root@jouet ~]# perf trace -e nanosleep,syscalls:*nanosleep sleep 1
0.000 ( ): syscalls:sys_enter_nanosleep:rqtp: 0x7ffd9f737950, rmtp: 0x00000000
0.009 ( ): sleep/7905 nanosleep(rqtp: 0x7ffd9f737950 ) ...
1000.204 ( ): syscalls:sys_exit_nanosleep:0x0
0.009 (1000.217 ms): sleep/7905 ... [continued]: nanosleep()) = 0
[root@jouet ~]#
Works, so the regression seems to be fixed, without looking at the code
that much:
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
- Arnaldo
next prev parent reply other threads:[~2018-04-17 16:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-17 15:54 [PATCH] tracing/x86: Update syscall trace events to handle new x86 syscall func names Steven Rostedt
2018-04-17 16:10 ` Dominik Brodowski
2018-04-17 16:39 ` Steven Rostedt
2018-04-17 16:58 ` Dominik Brodowski
2018-04-17 16:35 ` Arnaldo Carvalho de Melo [this message]
2018-04-17 16:40 ` Steven Rostedt
2018-04-17 16:44 ` Arnaldo Carvalho de Melo
2018-04-17 16:57 ` Steven Rostedt
2018-04-17 17:06 ` Arnaldo Carvalho de Melo
2018-04-17 17:08 ` Arnaldo Carvalho de Melo
2018-04-17 17:10 ` Steven Rostedt
2018-04-17 17:10 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180417163527.GA7775@kernel.org \
--to=acme@kernel.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=mingo@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox