I tested the patch and it works fine.
Could you add following patch if you approve?
commit bae7528fa92283726caac1ec7a6c306274f8899d
Author: Masatake YAMATO
Date: Mon Aug 22 17:44:55 2016 +0900
dm-ioctl: add a lvm private flag
When I run "dmsetup ls" under dm-ioctl patc
https://github.com/strace/strace/commit/a507a0bb777c552e43e1e45f302703a09ffea1b8
> Could you please review it and let us know if there are any issues?
It works fine on my Fedora 24(x86_64).
"make check" says "PASS" about ioctl_dm.test and ioctl_dm-v.test.
Very useful. Thank you.
Masatake YAMATO
>
Hi,
> Output Staging for -z Option (print successful syscalls only) / Patch included
Interesting idea, but I want logically reversed case: -z! Option (print
syscalls returning error), too.
Masatake YAMATO
--
Check
> Hi Yamato,
>
> Would a -Z option (inverse -z) be o.k? Combining both -zZ will print
> non-returning syscalls only.
-z! is just my random idea. -Z may be o.k.
Dmitry may answer this.
Masatake YAMATO
>
> Regards,
> Burkhard
>
> -Original Message-----
> Fro
^dup, @^send,
> @^recv, @^read, @^write, @^sem, @^shm, @^msg, @^inotify, @^pkey_
How about '/' (slash)?
vi and sed users may be familiar with the notation.
Masatake YAMATO
> diff --git a/qualify.c b/qualify.c
> index 157d313..5753530 100644
> --- a/qualify.c
> +++ b/quali
ption.
It is nice that -k own filtering rule can be defined.
Masatake YAMATO
On Sun, 4 Jun 2017 13:15:05 +0700, Nikolay Marchuk
wrote:
> Hello,
> This message describes new filtering architecture. Please, review it and
> give me feedback.
>
> Filtering language.
> The
o, great work! I have really wanted this.
Do you have a plan to work on decoding NETLINK_GENERIC?
I'm interested in the area. If you don't have a plan,
I would like to finish the following stub.
Masatake YAMATO
diff --git a/netlink.c b/netlink.c
index f9ff465..215807a 100644
--- a/netlink.
>> Masatake YAMATO
>>
>> diff --git a/netlink.c b/netlink.c
>> index f9ff465..215807a 100644
>> --- a/netlink.c
>> +++ b/netlink.c
>> @@ -110,6 +110,26 @@ static const struct {
>> [NETLINK_XFRM] = { nl_xfrm_types, "XFRM_MSG_???" }
ink_get): Cast statically given
the protocol name to `void *' to pass it to the call
back function.
(inet_parse_response,unix_parse_response,netlink_parse_response):
Introduce a local variable `proto_name' to convert the data type
of argument from `void *' to `const char*'.
to Linux kernel. When strace detects such action of the
target process, strace should extend the table for decoding the family id
of the newly registered subsystem.
Masatake YAMATO (6):
socketeutils: extend receive_responses() to handle other type than
SOCK_DIAG_BY_FAMILY communication
* tests/netlink_generic.c: New file.
* tests/gen_tests.in: Add netlink_generic.
* pure_executables.list: Add netlink_generic..
Signed-off-by: Masatake YAMATO
---
tests/.gitignore| 1 +
tests/gen_tests.in | 1 +
tests/netlink_generic.c | 78
-time.
Add an element for NETLINK_GENERIC.
(decode_nlmsg_type): Install the xlat table to the NETLINK_GENERIC
element of nlmsg_types.
Signed-off-by: Masatake YAMATO
---
netlink.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/netlink.c b/netlink.c
index 049843d..d
lding xlat in run-time. Decoding the
field is the primary use case of functions but they can be used
another purpose.
* defs.h (dyxlat_new, dyxlat_delete, dyxlat_may_add_pair): New functions
declarations.
(struct dyxlat): New opaque data type.
* dyxlat.c: New file.
Signed-off-by: Masatake Y
* socketutils.c (genl_families_xlat): exported function for building
the xlat table. Include linux/genetlink.h.
* defs.h (genl_families_xlat): add the declaration.
(genl_send_dump_families, genl_parse_families_response):
helper functions.
Signed-off-by: Masatake YAMATO
---
defs.h| 3
n.
Signed-off-by: Masatake YAMATO
---
socketutils.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/socketutils.c b/socketutils.c
index a3aedb4..3292c2e 100644
--- a/socketutils.c
+++ b/socketutils.c
@@ -189,6 +189,7 @@ inet_parse_response(const char *const proto_n
* socketutils.c (genl_families_xlat): exported function for building
the xlat table. Include linux/genetlink.h.
* defs.h (genl_families_xlat): add the declaration.
(genl_send_dump_families, genl_parse_families_response):
helper functions.
Signed-off-by: Masatake YAMATO
---
defs.h| 3
n.
Signed-off-by: Masatake YAMATO
---
socketutils.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/socketutils.c b/socketutils.c
index a3aedb4..f86acad 100644
--- a/socketutils.c
+++ b/socketutils.c
@@ -189,6 +189,7 @@ inet_parse_response(const char *const
ink_get): Cast statically given
the protocol name to `void *' to pass it to the call
back function.
(inet_parse_response,unix_parse_response,netlink_parse_response):
Introduce a local variable `proto_name' to convert the data type
of argument from `void *' to `const char*'.
cript.
Suggested by Dmitry V. Levin .
* keep NETLINK_* entries in nlmsg_types sorted.
Suggested by JingPiao Chen .
* Add tests/.gitignore to 6/6 change log.
Suggested by JingPiao Chen .
Masatake YAMATO (6):
socketeutils: extend receive_responses() to handle other
* tests/netlink_generic.c: New file.
* tests/gen_tests.in: Add netlink_generic.
* pure_executables.list: Likewise.
* tests/.gitignore: Add netlink_generic.
Signed-off-by: Masatake YAMATO
---
tests/.gitignore| 1 +
tests/gen_tests.in | 1 +
tests/netlink_generic.c
-time.
Add an element for NETLINK_GENERIC.
(decode_nlmsg_type): Install the xlat table to the NETLINK_GENERIC
element of nlmsg_types.
Signed-off-by: Masatake YAMATO
---
netlink.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/netlink.c b/netlink.c
index 049843d..5
lding xlat in run-time. Decoding the
field is the primary use case of functions but they can be used
another purpose.
* defs.h (dyxlat_new, dyxlat_delete, dyxlat_may_add_pair): New functions
declarations.
(struct dyxlat): New opaque data type.
* dyxlat.c: New file.
Signed-off-by: Masatake Y
Merge the file static functions in dyxlat.c to the exported functions
in the file.
Signed-off-by: Masatake YAMATO
---
Makefile.am | 1 +
defs.h | 6
dyxlat.c| 103
3 files changed, 110 insertions(+)
create
* Add tests/.gitignore to 6/6 change log.
Suggested by JingPiao Chen .
Masatake YAMATO (5):
dyxlat: building xlat dynamically
Introduce xstrndup function
socketutils: build a xlat table dynamically for decoding "family"
field of Netlink GENERIC protocol
netlink:
-time.
Add an element for NETLINK_GENERIC.
(decode_nlmsg_type): Install the xlat table to the NETLINK_GENERIC
element of nlmsg_types.
Signed-off-by: Masatake YAMATO
---
netlink.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/netlink.c b/netlink.c
index 049843d..5
* tests/netlink_generic.c: New file.
* tests/gen_tests.in: Add netlink_generic.
* pure_executables.list: Likewise.
* tests/.gitignore: Add netlink_generic.
Signed-off-by: Masatake YAMATO
---
tests/.gitignore| 1 +
tests/gen_tests.in | 1 +
tests/netlink_generic.c
r for storing family name even if it is not stored
to dyxlat.
Signed-off-by: Masatake YAMATO
---
configure.ac | 1 +
defs.h| 2 ++
socketutils.c | 110 ++
3 files changed, 113 insertions(+)
diff --git a/configure
* defs.h (xstrndup): New prototypes.
* xmalloc.c (xstrndup): New function.
Signed-off-by: Masatake YAMATO
---
defs.h| 1 +
xmalloc.c | 12
2 files changed, 13 insertions(+)
diff --git a/defs.h b/defs.h
index 52f40b3..063394e 100644
--- a/defs.h
+++ b/defs.h
@@ -398,6 +398,7
On Wed, 14 Jun 2017 00:55:03 +0300, "Dmitry V. Levin" wrote:
> On Tue, Jun 13, 2017 at 05:26:41PM +0900, Masatake YAMATO wrote:
>> xlat tables are generating in built-time of strace.
>>
>> printxval is suitable for printing `family' field of Netlink GENERIC
&
new dyxlat interface.
Signed-off-by: Masatake YAMATO
---
configure.ac | 1 +
defs.h| 2 ++
socketutils.c | 108 ++
3 files changed, 111 insertions(+)
diff --git a/configure.ac b/configure.ac
index 9bf89fc..ff9c7c5 100644
--- a/co
xtend the array when "used" is equal to greater than "allocated".
Update the xlat element before incrmenting "used" field.
Signed-off-by: Masatake YAMATO
---
Makefile.am | 1 +
defs.h | 6
dyxlat.c| 103 +
e this log to clear the relationship between an integer
for "family" and "type" field.
Signed-off-by: Masatake YAMATO
---
netlink.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/netlink.c b/netlink.c
index 4bef949..ff837f4 100644
--- a/
.
* Don't specify NUM_F_ACK.
Signed-off-by: Masatake YAMATO
---
tests/.gitignore| 1 +
tests/gen_tests.in | 1 +
tests/netlink_generic.c | 89 +
tests/pure_executables.list | 1 +
4 files changed, 92 insertions(+)
create mode 1
* defs.h (xstrndup): New prototype.
* xmalloc.c (xstrndup): New function.
* configure.ac (AC_CHECK_FUNC): check the avaiabllity of strndup.
Changes in version 4 (suggested by ldv):
* Use strndup if available.
* Fix a typo in log.
Signed-off-by: Masatake YAMATO
---
configure.ac
ous area of linux for me.
JingPiao Chen (and Fabien Siron), thank you very much.
Masatake YAMATO
--
Check out the vibrant tech community on one of the world's most
engaging tech sites,
_RESTORER,
sa_restorer=0x7fe71f385950}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGQUIT, {sa_handler=SIG_IGN, sa_mask=[],
sa_flags=SA_RESTORER, sa_restorer=0x7fe71f385950}, {sa_handler=SIG_DFL,
sa_mask=[]
...
Masatake YAMATO
> * defs.h (QUAL_STACKTRACE): A
* kvm.c (kvm_ioctl): Handle KVM_CREATE_VCPU.
(kvm_ioctl_create_vcpu): New function.
Signed-off-by: Masatake YAMATO
---
kvm.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/kvm.c b/kvm.c
index fdcf3466..1b21dab5 100644
--- a/kvm.c
+++ b/kvm.c
@@ -43,10 +43,21
* xlat/kvm_mem_flags.in: New file.
* kvm.c (kvm_ioctl): Handle KVM_SET_USER_MEMORY_REGION.
(kvm_ioctl_set_user_memory_region): New function.
(top-level): Include print_fields.h and xlat/kvm_mem_flags.h.
Signed-off-by: Masatake YAMATO
---
kvm.c | 22 ++
xlat
* kvm.c (kvm_ioctl): Handle KVM_CREATE_VM.
(kvm_ioctl_create_vm): New function.
Signed-off-by: Masatake YAMATO
---
kvm.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/kvm.c b/kvm.c
index 9fa7e248..fdcf3466 100644
--- a/kvm.c
+++ b/kvm.c
@@ -33,10 +33,23 @@
#ifdef
* kvm.c (kvm_ioctl): Handle KVM_SET_SREGS and KVM_GET_SREGES.
(kvm_ioctl_decode_sregs): New function.
(kvm_ioctl_decode_regs_dtable): New function.
(kvm_ioctl_decode_regs_segment): New function.
Signed-off-by: Masatake YAMATO
---
kvm.c | 82
* kvm.c: New file.
* Makefile.am (strace_SOURCES): Add kvm.c.
* configure.ac: Check the existence of linux/kvm.h.
* defs.h: Declare `kvm' as ioctl doecoder.
* ioctl.c: Call `kvm_ioctl'.
Signed-off-by: Masatake YAMATO
---
Makefile.am | 1 +
configure.ac | 1 +
defs.h | 1
* kvm.c (kvm_ioctl): Handle KVM_SET_REGS and KVM_GET_REGES.
(kvm_ioctl_decode_regs): New function.
Signed-off-by: Masatake YAMATO
---
kvm.c | 52
1 file changed, 52 insertions(+)
diff --git a/kvm.c b/kvm.c
index 43746fef..69a8c97a 100644
* kvm.c (kvm_ioctl): Handle KVM_RUN, KVM_GET_VCPU_MMAP_SIZE
and KVM_GET_API_VERSION.
Signed-off-by: Masatake YAMATO
---
kvm.c | 4
1 file changed, 4 insertions(+)
diff --git a/kvm.c b/kvm.c
index 8251ce7d..9fa7e248 100644
--- a/kvm.c
+++ b/kvm.c
@@ -37,6 +37,10 @@ int
kvm_ioctl(struct
* tests/Makefile.am: Add ioctl_kvm.
* tests/ioctl_kvm.c: New test target file.
Taken from https://lwn.net/Articles/658512/.
* tests/ioctl_kvm.expected: New expected file.
* tests/ioctl_kvm.test: New test driver.
---
tests/Makefile.am| 1 +
tests/ioctl_kvm.c| 152 +++
* kvm.c (kvm_ioctl): Handle KVM_CREATE_VM.
Change in v2:
* Don't make a redundant separated function.
Suggested by ldv.
Signed-off-by: Masatake YAMATO
---
kvm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kvm.c b/kvm.c
index 24a37ace..7497788e 100644
--- a/kvm.c
+++ b/
* kvm.c (kvm_ioctl_create_vcpu): New function.
(kvm_ioctl) : Use it.
Signed-off-by: Masatake YAMATO
---
kvm.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/kvm.c b/kvm.c
index 7497788e..f725f9df 100644
--- a/kvm.c
+++ b/kvm.c
@@ -33,10 +33,21 @@
#ifdef HAVE_LINUX_KVM_H
* kvm.c (kvm_ioctl): Handle KVM_RUN, KVM_GET_VCPU_MMAP_SIZE
and KVM_GET_API_VERSION.
Change in v2:
* Remove a pointless comment.
Suggested by ldv.
Signed-off-by: Masatake YAMATO
---
kvm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kvm.c b/kvm.c
index ebd6be7b..24a37ace 100644
available.
* Introduce files in which arch-specific and generic stub decoders
are defined. Use them from kvm_ioctl_decode_regs.
* Use umove_or_printaddr instead of umove.
All items are suggested by ldv.
Signed-off-by: Masatake YAMATO
---
configure.ac| 2 ++
kvm.c
* kvm.c: New file.
* Makefile.am (strace_SOURCES): Add kvm.c.
* configure.ac (AC_CHECK_HEADERS): Add linux/kvm.h.
* defs.h: Declare `kvm' as ioctl doecoder.
* ioctl.c: Call `kvm_ioctl'.
Change in v2:
* Remove default kvm_ioctl() implementation.
Suggested by ldv.
Signed-off-by: Masat
* tests/Makefile.am: Add ioctl_kvm.
* tests/ioctl_kvm.c: New test target file.
Taken from https://lwn.net/Articles/658512/.
* tests/ioctl_kvm.expected: New expected file.
* tests/ioctl_kvm.test: New test driver.
Changes in v2:
* Skip the test case if kvm.h is not available.
* Skip the test case
.
(kvm_ioctl_decode_regs_segment): Ditto.
Changes in v2:
* Decode only if struct kvm_sregs is available.
* Put arch-specific and generic stub decoders to arch_kvm.c.
* Use umove_or_printaddr instead of umove.
Above 3 items are suggested by ldv.
* Use more const modifiers.
Signed-off-by: Masatake
prints the zero address nicely.
Suggested by ldv.
Signed-off-by: Masatake YAMATO
---
kvm.c | 23 +++
xlat/kvm_mem_flags.in | 2 ++
2 files changed, 25 insertions(+)
create mode 100644 xlat/kvm_mem_flags.in
diff --git a/kvm.c b/kvm.c
index f725f9df..19779c84
I'm sorry that I don't put "PATCH v2" to the subjects.
Masatake YAMATO
> * kvm.c: New file.
> * Makefile.am (strace_SOURCES): Add kvm.c.
> * configure.ac (AC_CHECK_HEADERS): Add linux/kvm.h.
> * defs.h: Declare `kvm' as ioctl doecoder.
> * ioctl.c: Call `k
Thank you. I will revise the rest changes.
Masatake YAMATO
> On Sat, Dec 02, 2017 at 04:05:28AM +0900, Masatake YAMATO wrote:
>> * kvm.c (kvm_ioctl_create_vcpu): New function.
>> (kvm_ioctl) : Use it.
>
> I've merged the first 4 commits,
because umove_or_printaddr
performs verbose(tcp) check and prints the zero address nicely.
Suggested by ldv.
Change in v3:
* Verify the availability struct kvm_userspace_memory_region.
Suggested by ldv.
Signed-off-by: Masatake YAMATO
---
configure.ac | 2 ++
kvm.c
k the existence of struct kvm_regs.
We assume we can rely on struct kvm_regs being
available. Suggested by ldv.
* Add linux/x32/arch_kvm.c.
* Add new files to EXTRA_DIST.
All items are suggested by ldv.
Signed-off-by: Masatake YAMATO
---
Makefile.am | 3 +++
configure.ac
* tests/Makefile.am (check_PROGRAMS): Add ioctl_kvm.
(DECODER_TESTS): Add ioctl_kvm.test.
(EXTRA_DIST): Add ioctl_kvm.expected.
* tests/ioctl_kvm.c: New test target file.
Taken from https://lwn.net/Articles/658512/.
* tests/ioctl_kvm.expected: New expected file.
* tests/ioctl_kvm.test: New test d
guards around codes using kvm_sregs.
Suggested by ldv.
Signed-off-by: Masatake YAMATO
---
configure.ac| 4 ++-
kvm.c | 23 +
linux/arch_kvm.c| 10 +++
linux/x86_64/arch_kvm.c | 69 +
4
On Mon, 4 Dec 2017 14:23:14 +0300, "Dmitry V. Levin" wrote:
> On Mon, Dec 04, 2017 at 08:04:49PM +0900, Masatake YAMATO wrote:
>> * configure.ac (AC_CHECK_TYPES): Add struct kvm_userspace_memory_region.
>> * xlat/kvm_mem_flags.in: New file.
>> * kvm.c:
HAVE_STRUCT_KVM_USERSPACE_MEMORY_REGION.
Suggested by ldv.
Signed-off-by: Masatake YAMATO
---
configure.ac | 2 ++
kvm.c | 30 ++
xlat/kvm_mem_flags.in | 2 ++
3 files changed, 34 insertions(+)
create mode 100644 xlat/kvm_mem_flags.in
diff --git a/configure.ac b/configure.ac
/.
* Introduce PRINT_FIELD_KVM_SREGS_STRUCT macro for simplifying
the code for decoding sregs.
Signed-off-by: Masatake YAMATO
---
configure.ac| 5 ++--
kvm.c | 24 +
linux/arch_kvm.c| 11
linux/x86_64/arch_kvm.c | 72
* tests/Makefile.am (check_PROGRAMS): Add ioctl_kvm.
(DECODER_TESTS): Add ioctl_kvm.test.
(EXTRA_DIST): Add ioctl_kvm.expected.
* tests/ioctl_kvm.c: New test target file.
Taken from https://lwn.net/Articles/658512/.
* tests/ioctl_kvm.expected: New expected file.
* tests/ioctl_kvm.test: New test d
g a new file to the lists in Makefile.am.
* Sort when adding a new type to the AC_CHECK_TYPES.
All items are suggested by ldv.
Signed-off-by: Masatake YAMATO
---
Makefile.am | 3 +++
configure.ac| 5 -
kvm.c | 24
l
This patch is for demangling c++ symbols appeared in strack traces
with using cplus_demangle in GNU libiberty library,
I'm not sure this is acceptable or not because this change introdues a depedency
to a GPLv3+ library to strace.
This is an example of output of demangled stack trace:
fstat(5, {
I'm planning to linke strace with libiberty for mangling C++
symbol appearted in stack trace enabled with -k option.
Both the names, xmalloc and xcalloc, are already used in the
library. Therefore I rename the symbols defined in strace.
---
bpf.c| 2 +-
count.c | 4 ++--
dyxl
On Tue, 5 Dec 2017 13:59:17 +0300, "Dmitry V. Levin" wrote:
> On Tue, Dec 05, 2017 at 07:01:03PM +0900, Masatake YAMATO wrote:
>> This patch is for demangling c++ symbols appeared in strack traces
>> with using cplus_demangle in GNU libiberty library,
>>
>> I
* tests/Makefile.am (check_PROGRAMS): Add ioctl_kvm.
(DECODER_TESTS): Add ioctl_kvm.test.
(EXTRA_DIST): Add ioctl_kvm.expected.
* tests/ioctl_kvm.c: New test target file.
Taken from https://lwn.net/Articles/658512/.
* tests/ioctl_kvm.expected: New expected file.
* tests/ioctl_kvm.test: New test d
/.
* Introduce PRINT_FIELD_KVM_SREGS_STRUCT macro for simplifying
the code for decoding sregs.
Changes in v5:
* Don't return RVAL_DECODED if the decoder prints something.
Suggested by ldv.
Signed-off-by: Masatake YAMATO
---
configure.ac| 5 ++--
kvm.c
ldv.
Signed-off-by: Masatake YAMATO
---
Makefile.am | 3 +++
configure.ac| 5 -
kvm.c | 23 +++
linux/arch_kvm.c| 9 +
linux/i386/arch_kvm.c | 1 +
linux/x32/arch_kvm.c| 1 +
linux/x8
HAVE_STRUCT_KVM_USERSPACE_MEMORY_REGION.
Suggested by ldv.
Change in v5:
* Added missing closing curly bracket.
Signed-off-by: Masatake YAMATO
---
configure.ac | 2 ++
kvm.c | 31 +++
xlat/kvm_mem_flags.in | 2 ++
3 files changed, 35 insertions(+)
create mode 100644 xlat
On Thu, 7 Dec 2017 17:04:05 +0300, "Dmitry V. Levin" wrote:
> On Mon, Dec 04, 2017 at 10:08:17PM +0900, Masatake YAMATO wrote:
>> * tests/Makefile.am (check_PROGRAMS): Add ioctl_kvm.
>> (DECODER_TESTS): Add ioctl_kvm.test.
>> (EXTRA_DIST): Add ioctl_kvm.expected.
&
On Thu, 7 Dec 2017 17:18:50 +0300, "Dmitry V. Levin" wrote:
> On Thu, Dec 07, 2017 at 11:14:34PM +0900, Masatake YAMATO wrote:
>> On Thu, 7 Dec 2017 17:04:05 +0300, "Dmitry V. Levin"
>> wrote:
>> > On Mon, Dec 04, 2017 at 10:08:17PM +0900, Masa
c and
strace_malloc) rename the names defined in strace side for
avoiding the confliction.
* xmalloc.h (strace_calloc, strace_malloc): New macros.
Signed-off-by: Masatake YAMATO
---
xmalloc.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xmalloc.h b/xmalloc.h
index d1feeb91..89234e20 100644
nded to strace_LDFLAGS if
USE_DEMANGLE is defined.
(libiberty_LDADD): New macro appended to strace_LIBS if
USE_DEMANGLE is defined.
* configure.ac : Add --with-libiberty optoin.
Check libiberty support.
* unwind.c: Include demangle.h.
(print_stack_frame): Call cplus_demangle.
Sig
Hi,
I have NO intent to hurry you but IF you miss follow
two patches, could you look at them?
* [PATCH 1/2] Define macros for renaming xmalloc and xcalloc
* [PATCH 2/2] Unwind: demangle symbol names
Rewgards,
Masatake YAMATO
On Mon, 18 Dec 2017 13:24:54 +0900, Masatake YAMATO wrote:
>
.
* unwind.c (MMAP_CACHE_REBUILD_*): New enum.
(rebuild_cache_if_invalid): Return MMAP_CACHE_REBUILD_* instead of
bool value.
(build_mmap_cache): Don't call unw_flush_cache here.
(unwind_print_stacktrace, unwind_capture_stacktrace): Call
unw_flush_cache here instead.
Signed-off-by: Masatake Y
stand-alone function named mmap_cache_search.
* defs.h (mmap_cache_search): New function derived from
print_stack_frame.
* mmap_cached.c (mmap_cache_search): The implementation of the
new function.
* unwind.c (print_stack_frame): Use the new function.
Signed-off-by: Masatake YAMATO
---
defs.h
m unwind.c.
* unwind.c: remove mmap_cache implementation.
* syscall.c: call a function for invalidating mmap cache with new
name.
Signed-off-by: Masatake YAMATO
---
Makefile.am | 1 +
defs.h | 31 +-
mmap_cache.c | 183 ++
t are not executable
here.
Signed-off-by: Masatake YAMATO
---
defs.h | 9 +
mmap_cache.c | 27 ++-
unwind.c | 4 +++-
3 files changed, 34 insertions(+), 6 deletions(-)
diff --git a/defs.h b/defs.h
index a653c852..093acc3f 100644
--- a/defs.h
+++ b/d
(unwind_tcb_fin): Don't call mmap_cache_delete.
Signed-off-by: Masatake YAMATO
---
strace.c | 2 ++
unwind.c | 2 --
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/strace.c b/strace.c
index 0ee9b5e3..6ea1765a 100644
--- a/strace.c
+++ b/strace.c
@@ -782,6 +782,8 @@ droptcb(struct tcb
is useful for other purposes
than unwinding feature.
This patch set makes the code for caching usable independently of
unwinding feature. In the changes, I call the newly separated
code for caching "mmap_cache subsystem".
[1] https://marc.info/?l=kvm&m=151531408406144&w=2
* defs.h (mmap_cache_search_custom): New function.
(mmap_cache_search_fn): New type.
* mmap_cache.c (mmap_cache_search_custom): New function.
Signed-off-by: Masatake YAMATO
---
defs.h | 3 +++
mmap_cache.c | 12
2 files changed, 15 insertions(+)
diff --git a/defs.h b/defs.h
(syscall_exiting_decode): Use mmap_cache_is_enabled.
* unwind.c (unwind_init): Call mmap_cache_enable.
Signed-off-by: Masatake YAMATO
---
defs.h | 2 ++
mmap_cache.c | 11 +++
syscall.c| 4 +---
unwind.c | 1 +
4 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/defs.h b
* defs.h (struct mmap_cache_t): add major and minor fields.
* mmap_cache.c: record device major and minor numbers.
Signed-off-by: Masatake YAMATO
---
defs.h | 3 +++
mmap_cache.c | 9 +++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/defs.h b/defs.h
index 6c5f293d
(syscall_exiting_decode): Use mmap_cache_is_enabled.
* unwind.c (unwind_init): Call mmap_cache_enable.
Signed-off-by: Masatake YAMATO
---
defs.h | 2 ++
mmap_cache.c | 11 +++
syscall.c| 4 +---
unwind.c | 1 +
4 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/defs.h b
.
* unwind.c (MMAP_CACHE_REBUILD_*): New enum.
(rebuild_cache_if_invalid): Return MMAP_CACHE_REBUILD_* instead of
bool value.
(build_mmap_cache): Don't call unw_flush_cache here.
(unwind_print_stacktrace, unwind_capture_stacktrace): Call
unw_flush_cache here instead.
Signed-off-by: Masatake Y
t are not executable
here.
Signed-off-by: Masatake YAMATO
---
defs.h | 9 +
mmap_cache.c | 27 ++-
unwind.c | 4 +++-
3 files changed, 34 insertions(+), 6 deletions(-)
diff --git a/defs.h b/defs.h
index 1081a962..f49d6f56 100644
--- a/defs.h
+++ b/d
* defs.h (mmap_cache_search_custom): New function.
(mmap_cache_search_fn): New type.
* mmap_cache.c (mmap_cache_search_custom): New function.
Signed-off-by: Masatake YAMATO
---
defs.h | 3 +++
mmap_cache.c | 12
2 files changed, 15 insertions(+)
diff --git a/defs.h b/defs.h
is useful for other purposes
than unwinding feature.
This patch set makes the code for caching usable independently of
unwinding feature. In the changes, I call the newly separated
code for caching "mmap_cache subsystem".
[1] https://marc.info/?l=kvm&m=151531408406144&w=2
m unwind.c.
* unwind.c: remove mmap_cache implementation.
* syscall.c: call a function for invalidating mmap cache with new
name.
Signed-off-by: Masatake YAMATO
---
Makefile.am | 1 +
defs.h | 31 +-
mmap_cache.c | 185 ++
(unwind_tcb_fin): Don't call mmap_cache_delete.
Signed-off-by: Masatake YAMATO
---
strace.c | 2 ++
unwind.c | 2 --
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/strace.c b/strace.c
index 10579f66..794e9a0d 100644
--- a/strace.c
+++ b/strace.c
@@ -803,6 +803,8 @@ droptcb(struct tcb
stand-alone function named mmap_cache_search.
* defs.h (mmap_cache_search): New function derived from
print_stack_frame.
* mmap_cached.c (mmap_cache_search): The implementation of the
new function.
* unwind.c (print_stack_frame): Use the new function.
Signed-off-by: Masatake YAMATO
---
defs.h
* defs.h (struct mmap_cache_t): add major and minor fields.
* mmap_cache.c: record device major and minor numbers.
Signed-off-by: Masatake YAMATO
---
defs.h | 3 +++
mmap_cache.c | 9 +++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/defs.h b/defs.h
index 5b42590f
scall: removexattr
- name: setxattr
- syscall: setxattr
- syscall: lsetxattr
- syscall: fsetxattr
So you can do -e trace=%xattr or -e traec=%setxattr as you want.
However, I think we cannot say thie extension a microproject:-P
Masatake YAMATO
> On Thu, 15
(I've just joined this list. So I could not set Reply-to properly.)
Here is a patch I sent to the strace+ developer.
It seems that this is still applicable to Luca's new patch.
Masatake YAMATO
Hi,
I need followin
> On Tue, Jun 25, 2013 at 7:08 AM, Masatake YAMATO wrote:
>> Hi,
>>
>> I need following patch to avoid strace+ coredump.
>> Could you merge it the official source tree?
>>
>>
>> Signed-off-by: Masatake YAMATO
>>
>> diff --git a/syscal
How can I try this v2 patch?
As far as my seeing, I cannot find the definition of print_stacktrace
function. Should I apply both v1 and v2 patches?
Masatake YAMATO
> This patch prints the stack trace of the traced process after
> each system call when using -k flag. It uses libunw
I've tested on Fedora 19. It works fine.
BTW, I found that libunwind doesn't refer deubginfo file.
So the patched strace cannot resolve symbols well.
Porting debuginfo resolver from gdb to libunwind will be nice.
Masatake YAMATO
> This patch prints the stack trace of the traced
Hi,
> On Mon, Jul 8, 2013 at 5:02 AM, Masatake YAMATO wrote:
>> I've tested on Fedora 19. It works fine.
>>
>> BTW, I found that libunwind doesn't refer deubginfo file.
>> So the patched strace cannot resolve symbols well.
>> Porting debuginfo
After rebuilding libunwind with enabling minidebuginfo feature[1], your
patch works fine on my Fedora 19.
strace maintainer(s), is there any issue for merging the patch to
the official source tree?
[1] https://bugzilla.redhat.com/show_bug.cgi?id=972737
Masatake YAMATO
> This patch pri
1 - 100 of 305 matches
Mail list logo