<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/strace.git, branch ldv/travis-looping-threads-valgrind</title>
<subtitle>github.com: strace/strace.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/strace.git/'/>
<entry>
<title>travis: run looping_threads.test under valgrind</title>
<updated>2018-08-19T10:26:18+00:00</updated>
<author>
<name>Dmitry V. Levin</name>
<email>ldv@altlinux.org</email>
</author>
<published>2017-01-10T19:32:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/strace.git/commit/?id=b2e047f0d6504501c6ae330e6486d8f53841229e'/>
<id>b2e047f0d6504501c6ae330e6486d8f53841229e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement queueing of threads before dispatching them</title>
<updated>2018-08-19T10:26:18+00:00</updated>
<author>
<name>Eugene Syromyatnikov</name>
<email>evgsyr@gmail.com</email>
</author>
<published>2018-08-08T19:41:39+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/strace.git/commit/?id=82f7fea5220992e1538200564cf7021bb3f39b5b'/>
<id>82f7fea5220992e1538200564cf7021bb3f39b5b</id>
<content type='text'>
It is possible that some tracees call a lot of cheap syscalls too fast,
and that can lead to starvation to the point some tracees are not served
for indefinite amount of time.  In order to solve that unfairness, try
to collect all the pending tracees first (along with the relevant
information) and only then dispatch the events.

* defs.h: Include "list.h".
(struct tcb): Add wait_data_idx, wait_extra_data_idx, wait_list fields.
* strace.c (tcb_wait_tab): New variable.
(expand_tcbtab): Resize tcb_wait_tab along with tcbtab, provide
an additional slot for extra event.
(droptcb): Remove tcp from wait_list.
(maybe_switch_tcbs): Get old pid from
tcb_wait_tab[tcp-&gt;wait_data_idx].msg.
(next_event): Add pending_tcps, extra_tcp, wait_nohang, elem, and
wait_tab_pos variables; check for elements in pending_tcps and skip
waiting if the list is not empty; check for extra_tcp and skip waiting
along with swapping wait_data_idx with wait_extra_data_idx;
after the initial wait, call wait4() in loop with WNOHANG flag set;
fetch siginfo on signal and eventmsg on PTRACE_EVENT_EXEC;
return the first tcp in pending_tcps list.
* tests/Makefile.am (XFAIL_TEST): Remove looping_threads.test.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=478419
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=526740
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=851457
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1609318
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1610774
Co-Authored-by: Dmitry Vlasenko &lt;dvlasenk@redhat.com&gt;
Co-Authored-by: Andreas Schwab &lt;aschwab@redhat.com&gt;
Co-Authored-by: Jeff Law &lt;law@redhat.com&gt;
Co-Authored-by: DJ Delorie &lt;dj@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is possible that some tracees call a lot of cheap syscalls too fast,
and that can lead to starvation to the point some tracees are not served
for indefinite amount of time.  In order to solve that unfairness, try
to collect all the pending tracees first (along with the relevant
information) and only then dispatch the events.

* defs.h: Include "list.h".
(struct tcb): Add wait_data_idx, wait_extra_data_idx, wait_list fields.
* strace.c (tcb_wait_tab): New variable.
(expand_tcbtab): Resize tcb_wait_tab along with tcbtab, provide
an additional slot for extra event.
(droptcb): Remove tcp from wait_list.
(maybe_switch_tcbs): Get old pid from
tcb_wait_tab[tcp-&gt;wait_data_idx].msg.
(next_event): Add pending_tcps, extra_tcp, wait_nohang, elem, and
wait_tab_pos variables; check for elements in pending_tcps and skip
waiting if the list is not empty; check for extra_tcp and skip waiting
along with swapping wait_data_idx with wait_extra_data_idx;
after the initial wait, call wait4() in loop with WNOHANG flag set;
fetch siginfo on signal and eventmsg on PTRACE_EVENT_EXEC;
return the first tcp in pending_tcps list.
* tests/Makefile.am (XFAIL_TEST): Remove looping_threads.test.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=478419
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=526740
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=851457
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1609318
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1610774
Co-Authored-by: Dmitry Vlasenko &lt;dvlasenk@redhat.com&gt;
Co-Authored-by: Andreas Schwab &lt;aschwab@redhat.com&gt;
Co-Authored-by: Jeff Law &lt;law@redhat.com&gt;
Co-Authored-by: DJ Delorie &lt;dj@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a generic list implementation</title>
<updated>2018-08-19T10:26:18+00:00</updated>
<author>
<name>Eugene Syromyatnikov</name>
<email>evgsyr@gmail.com</email>
</author>
<published>2016-09-11T09:11:45+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/strace.git/commit/?id=49dbd3792d19fb0450150412849e8447942db269'/>
<id>49dbd3792d19fb0450150412849e8447942db269</id>
<content type='text'>
Similar to one used in the Linux kernel.

* macros.h (cast_ptr, containerof): New macros.
* list.h: New file.
* Makefile.am (strace_SOURCES): Add it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar to one used in the Linux kernel.

* macros.h (cast_ptr, containerof): New macros.
* list.h: New file.
* Makefile.am (strace_SOURCES): Add it.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: check tracing of looping threads</title>
<updated>2018-08-19T10:26:18+00:00</updated>
<author>
<name>Dmitry V. Levin</name>
<email>ldv@altlinux.org</email>
</author>
<published>2018-07-04T02:11:27+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/strace.git/commit/?id=42c11b563476d1e87821d0af1868cccd7147c353'/>
<id>42c11b563476d1e87821d0af1868cccd7147c353</id>
<content type='text'>
* test/many_looping_threads.c: Remove.
* test/.gitignore: Remove many_looping_threads.
* test/Makefile (PROGS): Likewise.
(many_looping_threads): Remove.
* tests/looping_threads.c: New file.
* tests/looping_threads.test: New test.
* tests/.gitignore: Add looping_threads.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(looping_threads_LDADD): New variable.
(MISC_TESTS, XFAIL_TESTS): Add looping_threads.test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* test/many_looping_threads.c: Remove.
* test/.gitignore: Remove many_looping_threads.
* test/Makefile (PROGS): Likewise.
(many_looping_threads): Remove.
* tests/looping_threads.c: New file.
* tests/looping_threads.test: New test.
* tests/.gitignore: Add looping_threads.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(looping_threads_LDADD): New variable.
(MISC_TESTS, XFAIL_TESTS): Add looping_threads.test.
</pre>
</div>
</content>
</entry>
<entry>
<title>strace.c: introduce struct tcb_wait_data</title>
<updated>2018-08-19T10:26:18+00:00</updated>
<author>
<name>Dmitry V. Levin</name>
<email>ldv@altlinux.org</email>
</author>
<published>2018-08-14T13:43:34+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/strace.git/commit/?id=14ae61f37b7c4ec236f011ab5c5866b43f6766b4'/>
<id>14ae61f37b7c4ec236f011ab5c5866b43f6766b4</id>
<content type='text'>
Introduce a new structure to pass information between next_event(),
restart_delayed_tcb(), and dispatch_event().

This is going to be used by a subsequent change of next_event().

* strace.c (struct tcb_wait_data): New type.
(next_event): Remove parameters, return a pointer
to const struct tcb_wait_data.  Return NULL instead of TE_BREAK.
(dispatch_event): Replace all parameters with a pointer
to const struct tcb_wait_data, obtain the trace event, siginfo,
and status from its fields.
(restart_delayed_tcb): Add local struct tcb_wait_data variable
with te field set to TE_RESTART, pass it to dispatch_event().
(main): Remove status and si variables, update next_event()
and dispatch_event() invocations.

Co-Authored-by: Eugene Syromyatnikov &lt;evgsyr@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce a new structure to pass information between next_event(),
restart_delayed_tcb(), and dispatch_event().

This is going to be used by a subsequent change of next_event().

* strace.c (struct tcb_wait_data): New type.
(next_event): Remove parameters, return a pointer
to const struct tcb_wait_data.  Return NULL instead of TE_BREAK.
(dispatch_event): Replace all parameters with a pointer
to const struct tcb_wait_data, obtain the trace event, siginfo,
and status from its fields.
(restart_delayed_tcb): Add local struct tcb_wait_data variable
with te field set to TE_RESTART, pass it to dispatch_event().
(main): Remove status and si variables, update next_event()
and dispatch_event() invocations.

Co-Authored-by: Eugene Syromyatnikov &lt;evgsyr@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xlat: fix typo in smc_protocols.in</title>
<updated>2018-08-19T10:26:18+00:00</updated>
<author>
<name>Eugene Syromyatnikov</name>
<email>evgsyr@gmail.com</email>
</author>
<published>2018-08-19T19:51:15+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/strace.git/commit/?id=2d88ec9e392edc2652ad5617498765f21af2b611'/>
<id>2d88ec9e392edc2652ad5617498765f21af2b611</id>
<content type='text'>
* xlat/smc_protocols.in: s/^MCPROTO_SMC/SMCPROTO_SMC/.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* xlat/smc_protocols.in: s/^MCPROTO_SMC/SMCPROTO_SMC/.
</pre>
</div>
</content>
</entry>
<entry>
<title>ci: add a test with the latest gcc and mainline headers</title>
<updated>2018-08-19T10:26:18+00:00</updated>
<author>
<name>Dmitry V. Levin</name>
<email>ldv@altlinux.org</email>
</author>
<published>2018-08-19T10:26:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/strace.git/commit/?id=538cf68f125ef1ca676237d297788c7ca931ca7c'/>
<id>538cf68f125ef1ca676237d297788c7ca931ca7c</id>
<content type='text'>
* .gitlab-ci.yml (gcc-x86_64-libdw-mainline): New entry.
* .travis.yml (CC=gcc-8, KHEADERS=torvalds/linux): Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* .gitlab-ci.yml (gcc-x86_64-libdw-mainline): New entry.
* .travis.yml (CC=gcc-8, KHEADERS=torvalds/linux): Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>ci: update gitlab ubuntu image</title>
<updated>2018-08-19T10:26:18+00:00</updated>
<author>
<name>Dmitry V. Levin</name>
<email>ldv@altlinux.org</email>
</author>
<published>2018-08-19T10:26:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/strace.git/commit/?id=9725de9c22bf3e129c73e3d3de000a6d41491489'/>
<id>9725de9c22bf3e129c73e3d3de000a6d41491489</id>
<content type='text'>
* .gitlab-ci.yml (image): Replace "ubuntu:17.10" with "ubuntu:18.04".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* .gitlab-ci.yml (image): Replace "ubuntu:17.10" with "ubuntu:18.04".
</pre>
</div>
</content>
</entry>
<entry>
<title>ci: install kernel headers after compiler dependencies</title>
<updated>2018-08-19T10:26:18+00:00</updated>
<author>
<name>Dmitry V. Levin</name>
<email>ldv@altlinux.org</email>
</author>
<published>2018-08-19T10:26:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/strace.git/commit/?id=7b0d371b3f68a8747ca6f48a809d09e8d3d41122'/>
<id>7b0d371b3f68a8747ca6f48a809d09e8d3d41122</id>
<content type='text'>
* ci/install-dependencies.sh: Install kernel headers after compiler
dependencies to avoid a needless attempt to install $common_packages.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* ci/install-dependencies.sh: Install kernel headers after compiler
dependencies to avoid a needless attempt to install $common_packages.
</pre>
</div>
</content>
</entry>
<entry>
<title>ci: fix kernel headers version diagnostics</title>
<updated>2018-08-19T10:26:18+00:00</updated>
<author>
<name>Dmitry V. Levin</name>
<email>ldv@altlinux.org</email>
</author>
<published>2018-08-19T10:26:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/strace.git/commit/?id=f0ec4e696ceb4b1e2c9b80daa5599431e6f9811c'/>
<id>f0ec4e696ceb4b1e2c9b80daa5599431e6f9811c</id>
<content type='text'>
* ci/run-build-and-tests.sh: Honor $CPPFLAGS when printing
kernel headers version.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* ci/run-build-and-tests.sh: Honor $CPPFLAGS when printing
kernel headers version.
</pre>
</div>
</content>
</entry>
</feed>
