All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Matthias Weckbecker <matthias@weckbecker.name>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH] plugins: new syscalls plugin
Date: Wed, 10 Mar 2021 18:26:53 +0000	[thread overview]
Message-ID: <87sg527tfb.fsf@linaro.org> (raw)
In-Reply-To: <20200812115816.4454-1-matthias@weckbecker.name>


Matthias Weckbecker <matthias@weckbecker.name> writes:

> This commit adds a new syscalls plugin that displays the syscalls
> as they are executed and returned. This plugin outputs the number
> of the syscall as well as the syscall return value.
>
> Works in *-user only.
>
> Essentially, this commit restores:
>
>   https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg00846.html
>
> by using the new QEMU plugin API.

Sorry I missed this last year, I've queued to plugins/next. That said in
it's current form you basically replicate what you already have with
-strace:

  ./qemu-aarch64 -strace -d plugin -plugin ./tests/plugin/libsyscall.so ./tests/tcg/aarch64-linux-user/testthread
  syscall #214
  13165 brk(NULL) = 0x000000000049a000
  syscall #214 returned -> 4825088
  syscall #214
  13165 brk(0x000000000049af90) = 0x000000000049af90
  syscall #214 returned -> 4829072
  syscall #160
  13165 uname(0x5500800498) = 0
  syscall #160 returned -> 0
  syscall #96
  13165 set_tid_address(4825296,0,4294967293,4826880,4825088,253) = 13165
  syscall #96 returned -> 13165

So it would be nice to make the default maybe do something more useful
(like emulate strace -C output). You could certainly keep the verbose
output controlled by a flag.

Still as it is it at least ensures we exercise the code ;-)

-- 
Alex Bennée


      reply	other threads:[~2021-03-10 18:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-12 11:58 [PATCH] plugins: new syscalls plugin Matthias Weckbecker
2021-03-10 18:26 ` Alex Bennée [this message]

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=87sg527tfb.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=matthias@weckbecker.name \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.