lttv.git
14 years agoRebuild traceset contexts after performing synchronization
Benjamin Poirier [Thu, 17 Dec 2009 16:28:29 +0000 (11:28 -0500)] 
Rebuild traceset contexts after performing synchronization

This fixes an integration bug with the state system that caused the control
flow view display to become corrupted when zooming in closely to synchronized
traces. It also caused many messages like
WARNING **: Cannot find pin_in in schedchange 5
to be displayed.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoCorrect the README regarding eval mode usage
Benjamin Poirier [Mon, 14 Dec 2009 16:44:49 +0000 (11:44 -0500)] 
Correct the README regarding eval mode usage

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoChange a test file to create hulls that are more spaced out
Benjamin Poirier [Sun, 6 Dec 2009 20:20:44 +0000 (15:20 -0500)] 
Change a test file to create hulls that are more spaced out

This way they are easier to see.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoFix leaks and invalid memory accesses
Benjamin Poirier [Fri, 27 Nov 2009 18:43:05 +0000 (13:43 -0500)] 
Fix leaks and invalid memory accesses

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoAdd a processing module that reads events from a text file
Benjamin Poirier [Fri, 27 Nov 2009 16:09:44 +0000 (11:09 -0500)] 
Add a processing module that reads events from a text file

This is particularly useful for unitests.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoAdd sync_chain_unittest
Benjamin Poirier [Thu, 26 Nov 2009 22:03:06 +0000 (17:03 -0500)] 
Add sync_chain_unittest

Makes the former unitest program more compliant with the current architecture.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoUse a common function to print stats of all modules
Benjamin Poirier [Thu, 26 Nov 2009 20:57:03 +0000 (15:57 -0500)] 
Use a common function to print stats of all modules

Removes code duplication.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoInitialize traceNb in the processing modules
Benjamin Poirier [Thu, 26 Nov 2009 20:39:42 +0000 (15:39 -0500)] 
Initialize traceNb in the processing modules

Removes manipulation of structure fields by sync_chain.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoMake option type OPTIONAL_ARG available
Benjamin Poirier [Thu, 26 Nov 2009 18:43:30 +0000 (13:43 -0500)] 
Make option type OPTIONAL_ARG available

These options are not be supported by Lttv and will be ignored (with a warning
message).

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoinitProcessing takes a va_arg rather than an lttv-specific type
Benjamin Poirier [Thu, 26 Nov 2009 16:12:58 +0000 (11:12 -0500)] 
initProcessing takes a va_arg rather than an lttv-specific type

Makes the framework more general.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoMove some functions around to improve overall structure
Benjamin Poirier [Wed, 25 Nov 2009 20:57:01 +0000 (15:57 -0500)] 
Move some functions around to improve overall structure

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoClean debug statements
Benjamin Poirier [Wed, 25 Nov 2009 20:14:41 +0000 (15:14 -0500)] 
Clean debug statements

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoRemove unused g_info definitions
Benjamin Poirier [Wed, 25 Nov 2009 20:06:03 +0000 (15:06 -0500)] 
Remove unused g_info definitions

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoRemove leftover references to processing_lttv
Benjamin Poirier [Wed, 25 Nov 2009 20:02:48 +0000 (15:02 -0500)] 
Remove leftover references to processing_lttv

It is now called processing_lttng.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoDon't access stats if they're not activated
Benjamin Poirier [Wed, 25 Nov 2009 19:58:01 +0000 (14:58 -0500)] 
Don't access stats if they're not activated

Fixes a bug.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoUpdate README with info about algorithms, glpk and more
Benjamin Poirier [Wed, 25 Nov 2009 19:41:51 +0000 (14:41 -0500)] 
Update README with info about algorithms, glpk and more

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoPrint approximation type from a constant instead of hardcoded
Benjamin Poirier [Wed, 25 Nov 2009 19:41:34 +0000 (14:41 -0500)] 
Print approximation type from a constant instead of hardcoded

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoMake the accuracy area easier to see on the broadcast graphs
Benjamin Poirier [Tue, 24 Nov 2009 22:18:20 +0000 (17:18 -0500)] 
Make the accuracy area easier to see on the broadcast graphs

Replots the contour of the area over the broadcast points.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoHave callbacks for "background" and "foreground" graphs
Benjamin Poirier [Tue, 24 Nov 2009 21:17:51 +0000 (16:17 -0500)] 
Have callbacks for "background" and "foreground" graphs

Allows easier composition of many functions on a single graph.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoGenerate graphs of synchronization accuracy
Benjamin Poirier [Tue, 17 Nov 2009 19:35:48 +0000 (14:35 -0500)] 
Generate graphs of synchronization accuracy

This depends on libglpk. Automatically enabled if present at configure time.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoStore graph callbacks in a structure
Benjamin Poirier [Mon, 16 Nov 2009 22:04:54 +0000 (17:04 -0500)] 
Store graph callbacks in a structure

Also support two classes of graphs: with "trace-trace" scale (both axes
present timestamp data); with "trace-time" scale (horizontal axis presents
timestamp data, vertical axis presents difference between timstamps)

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoGenerate graphs of broadcasts
Benjamin Poirier [Fri, 13 Nov 2009 20:30:07 +0000 (15:30 -0500)] 
Generate graphs of broadcasts

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoUse a timescale without correction in the graphs
Benjamin Poirier [Mon, 16 Nov 2009 16:17:24 +0000 (11:17 -0500)] 
Use a timescale without correction in the graphs

... since graphs present timestamp data without correction.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoDo not use LttCycleCount elsewhere than in processing_lttv
Benjamin Poirier [Fri, 13 Nov 2009 17:06:09 +0000 (12:06 -0500)] 
Do not use LttCycleCount elsewhere than in processing_lttv

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoPrint a sum row in the evaluation statistics
Benjamin Poirier [Fri, 6 Nov 2009 21:56:40 +0000 (16:56 -0500)] 
Print a sum row in the evaluation statistics

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoShow the latency histograms by IP address rather than by trace
Benjamin Poirier [Fri, 6 Nov 2009 19:22:31 +0000 (14:22 -0500)] 
Show the latency histograms by IP address rather than by trace

A trace may contain traffic between more than just one pair of hosts.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoAdd graphStream field to syncState
Benjamin Poirier [Thu, 5 Nov 2009 20:27:54 +0000 (15:27 -0500)] 
Add graphStream field to syncState

So that modules can create their own individual graphs, independently of the
write[...]GraphsPlots()/Options() mechanism.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoUse histograms with logarithmicly-sized bins
Benjamin Poirier [Wed, 4 Nov 2009 22:15:06 +0000 (17:15 -0500)] 
Use histograms with logarithmicly-sized bins

These are very cool and fancy! In a single pass you get good resolution for
small values (not all lumped in one bin) without wasting many small bins for
large values. You also do no loose any values at all thanks to underflow and
overflow bins at each end. Number of bins is configurable.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoCall the stats and graph functions from sync_chain
Benjamin Poirier [Tue, 3 Nov 2009 18:57:36 +0000 (13:57 -0500)] 
Call the stats and graph functions from sync_chain

Versus the former daisy chain method, this avoids having the analysis stats
and graph functions called twice when there are many matching modules (via
matching_distributor).

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoAdd a module to distribute messages to many analysis modules
Benjamin Poirier [Tue, 3 Nov 2009 16:31:07 +0000 (11:31 -0500)] 
Add a module to distribute messages to many analysis modules

Also perform RTT analysis in the eval module.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoAdds wall time field to events
Benjamin Poirier [Mon, 2 Nov 2009 19:58:49 +0000 (14:58 -0500)] 
Adds wall time field to events

Also analyze more events in the eval module.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoAdd support for module options
Benjamin Poirier [Fri, 30 Oct 2009 23:09:26 +0000 (19:09 -0400)] 
Add support for module options

This is independant (down to sync_chain) of lttv's option mechanism.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoAdd a module to evaluate the quality of synchronization
Benjamin Poirier [Wed, 28 Oct 2009 19:10:53 +0000 (15:10 -0400)] 
Add a module to evaluate the quality of synchronization

Prints information about message inversions.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoAdd a broadcast matching module
Benjamin Poirier [Tue, 27 Oct 2009 21:08:28 +0000 (17:08 -0400)] 
Add a broadcast matching module

Matches UDP packets based on their first 8 bytes of content (this also depends
on the kernel instrumentation).

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoAdd a batchanalysis module to build and run a sync chain
Benjamin Poirier [Tue, 27 Oct 2009 17:56:25 +0000 (13:56 -0400)] 
Add a batchanalysis module to build and run a sync chain

This is mostly to build a sync chain with an analysis module that evaluates
the quality of synchronization. It does not modifiy the time correction
factors in the traces.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoProcessing of UDP events
Benjamin Poirier [Mon, 26 Oct 2009 20:59:42 +0000 (16:59 -0400)] 
Processing of UDP events

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoAdjust the marker names used for clock synchronization
Benjamin Poirier [Tue, 20 Oct 2009 18:25:06 +0000 (14:25 -0400)] 
Adjust the marker names used for clock synchronization

... according to the patches posted to the ltt-dev list on 2009-10-21. There
are now regular and _extended version of the markers. Synchronization needs
the extended version.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoAdd a README for the clock synchronization code
Benjamin Poirier [Thu, 8 Oct 2009 20:04:37 +0000 (16:04 -0400)] 
Add a README for the clock synchronization code

This README describes the principles, usage and design of clock
synchronization in LTT.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoMake the synchronization module interfaces more generic
Benjamin Poirier [Thu, 8 Oct 2009 20:03:07 +0000 (16:03 -0400)] 
Make the synchronization module interfaces more generic

Instead of taking NetEvents and Packets, public interfaces take Events,
Messages and Exchanges. These are specialized into other structures for TCP.
This is to support the eventual integration of algorithms based on other event
types, like UDP.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoAdd a unittest program for clock synchronization modules
Benjamin Poirier [Fri, 4 Sep 2009 18:44:33 +0000 (14:44 -0400)] 
Add a unittest program for clock synchronization modules

Allows to test matching and analysis modules with data read from text files.
Includes some sample data for simple good and bad (unsynchronizable) cases.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoAdd convex hull algorithm-based synchronization
Benjamin Poirier [Fri, 14 Aug 2009 19:54:45 +0000 (15:54 -0400)] 
Add convex hull algorithm-based synchronization

This analysis module implements an algorithm that provides a garantee that the
synchronization will not result in inverted messages. It is now the default
algorithm, over linear regression.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoDo not use pkfree_skb events for synchronization
Benjamin Poirier [Mon, 10 Aug 2009 20:13:40 +0000 (16:13 -0400)] 
Do not use pkfree_skb events for synchronization

Don't rely on events indicating when sk_buff structures are freed. After a
receive, we wait for another event indicating that this receive was for TCP
data. In the case where the data was not TCP, instead of keeping information
about the receive, we used to discard it when the skb was freed.  It turns out
that it faster (and simpler) not to look at pkfree_skb events and keep the
information around anyways. Since sk_buff's are allocated in a pool, the
information will get overwritten and the size of pendingRecv will not grow
infinitely.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoSplit the synchronization code into modules
Benjamin Poirier [Thu, 23 Jul 2009 21:59:24 +0000 (17:59 -0400)] 
Split the synchronization code into modules

Separates synchronization code in processing, matching and analysis modules.
There is also a "sync-chain" that coordinates module creation.

Adds a "--sync-null" option, mainly for performance evaluation.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoGraphical mode synchronization
Benjamin Poirier [Wed, 22 Jul 2009 18:21:32 +0000 (14:21 -0400)] 
Graphical mode synchronization

Hooks the trace synchronization code in lttvwindow. This allows to use trace
synchronization in graphical mode when lttv is started with the "--sync"
option. Unfortunately, the viewer interface "freezes" while the
synchronization code is running. This can take a noticeable amount of time
(more than a minute) for large traces.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoText mode clock synchronization
Benjamin Poirier [Fri, 10 Jul 2009 15:31:47 +0000 (11:31 -0400)] 
Text mode clock synchronization

Adds linear regression based clock correction of a group of traces. This is
mostly a reimplementation of the work presented in
[1] Clément, E.: Synchronisation de traces dans un réseau distribué, Ã‰cole
Polytechnique de montréal, 2006

This implementation does not use a synchronization "window" and timeouts as
described in figure 3.3 of [1]. Not using that algorithm, we don't have to
rely on the system time to be loosely synchronized; events can be processed
regardless of the order the traces are merge-sorted. The downside is that
there is no limit to the number of events that could be queued up, waiting for
their matching event from another trace. The solution to this would be to
insert extra logic (like a plugable module) that controls the merge-sort;
upstream of event delivery to the syncrhonization code. Many possibilities
come to mind:
1) reimplement something like what is found in [1] that relies on system time
for a weak pre-synchronization
2) use a heuristic based on the size of the current queue for each trace in
the synchronization code. If a trace's queue is growing and growing, deliver
events to other traces.

This implementation also does not need to keep track of the IP adresses
assigned to local interfaces. If a packet is processed by the network
subsystem it can be used for synchronization. There is no need to know if the
node really the packet's final destination.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoAdd members to LttTrace to support time adjustments
Benjamin Poirier [Thu, 9 Jul 2009 19:13:56 +0000 (15:13 -0400)] 
Add members to LttTrace to support time adjustments

Adds a function to convert tsc values to nanoseconds.
Adds drift and offset members for linear clock correction.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
14 years agoRevert "sync frequency of all traces with the first loaded"
Benjamin Poirier [Mon, 31 Aug 2009 21:11:13 +0000 (17:11 -0400)] 
Revert "sync frequency of all traces with the first loaded"

This reverts commit 9c731a505cf0d0ded02f8e90a823fa90084c7740.

Conflicts:

ltt/branches/poly/ltt/tracefile.c

14 years agoupdate compat
Mathieu Desnoyers [Wed, 16 Dec 2009 22:38:30 +0000 (17:38 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
14 years agoupdate version
Mathieu Desnoyers [Wed, 16 Dec 2009 22:35:13 +0000 (17:35 -0500)] 
update version

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
14 years agoupdate compat
Mathieu Desnoyers [Wed, 16 Dec 2009 22:33:45 +0000 (17:33 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
14 years agoupdate compat
Mathieu Desnoyers [Wed, 16 Dec 2009 21:23:28 +0000 (16:23 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
14 years agoTemporary fix for large IRQ tables
Mathieu Desnoyers [Tue, 15 Dec 2009 18:50:40 +0000 (13:50 -0500)] 
Temporary fix for large IRQ tables

IRQ tables, trap tables and softirq tables can grow. The copy mechanism for
these is not correct when saving/restoring state, because it uses always the
name table size (which grows) to copy the saved/restored state snapshots.

We should change the g_new allocations for g_arrays, and use the array length as
boundary for the copy rather than the name table len.

TODO / FIXME !

I currently increased the initial irq name table size to 512 to deal correctly
with ARM. This is a dumb temporary fix.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
14 years agoupdate compat
Mathieu Desnoyers [Fri, 4 Dec 2009 16:13:29 +0000 (11:13 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
14 years agoupdate compat
Mathieu Desnoyers [Fri, 4 Dec 2009 15:59:33 +0000 (10:59 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
14 years agoupdate compat
Mathieu Desnoyers [Tue, 1 Dec 2009 12:04:38 +0000 (07:04 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
14 years agoupdate compat
Mathieu Desnoyers [Fri, 27 Nov 2009 17:43:40 +0000 (12:43 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
14 years agoupdate version
Mathieu Desnoyers [Fri, 27 Nov 2009 17:33:55 +0000 (12:33 -0500)] 
update version

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
14 years agostate.c coding style fix
Mathieu Desnoyers [Fri, 27 Nov 2009 17:33:24 +0000 (12:33 -0500)] 
state.c coding style fix

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
14 years agowakeup wait for cpu display
Chris Smowton [Fri, 27 Nov 2009 17:18:31 +0000 (12:18 -0500)] 
wakeup wait for cpu display

Here's a slightly more constructive patch: this one adds support in
LTTV's generic state monitoring code and its control flow visualiser to
note when a process is woken by another process using the
sched_try_wakeup event.

Previously the woken process would continue to register its old state
until such time as it got scheduled; here the process transitions to
WAIT_CPU state (like preempted processes, indicating it is ready to run
but not currently scheduled). Ordinarily we see this state exist very
briefly, in between the device driver IRQ (typically) clearing it to run
and the scheduler invocation after irq_exit, but on a heavily loaded
system we might see a large stripe of dark yellow indicating the process
is ready but cannot yet be allocated a core.

The new code in controlflow/eventhooks.c is essentially a copy of the
second half of before_schedchange -- it would be nice to factor these
two and before_execmode, all of which basically identify a process,
create state objects if necessary, and draw his line up to a certain
time.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Mon, 23 Nov 2009 04:52:20 +0000 (23:52 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Mon, 23 Nov 2009 01:09:46 +0000 (20:09 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Thu, 19 Nov 2009 05:46:33 +0000 (00:46 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agomake lttv runnable from anywhere
Pierre-Marc Fournier [Wed, 18 Nov 2009 19:35:46 +0000 (14:35 -0500)] 
make lttv runnable from anywhere

Icons however can't be found when they are not installed and runlttv
is run from an arbitrary directory.

15 years agoAdd pixmaps shortcut
Benjamin Poirier [Mon, 9 Nov 2009 18:27:25 +0000 (13:27 -0500)] 
Add pixmaps shortcut

This shortcut is used by runlttv

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
15 years agoFix help text
Benjamin Poirier [Mon, 9 Nov 2009 18:27:46 +0000 (13:27 -0500)] 
Fix help text

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
15 years agoIgnore configure.lineno
Benjamin Poirier [Mon, 9 Nov 2009 18:26:30 +0000 (13:26 -0500)] 
Ignore configure.lineno

Generated by autoconf in shells that lack $LINENO

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Wed, 18 Nov 2009 17:57:01 +0000 (12:57 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate version
Mathieu Desnoyers [Wed, 18 Nov 2009 17:55:52 +0000 (12:55 -0500)] 
update version

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoLTTV trace control bug fix
Chris Smowton [Wed, 18 Nov 2009 17:49:12 +0000 (12:49 -0500)] 
LTTV trace control bug fix

Chris Smowton <cs448@cam.ac.uk>:

...whenever I tried
to start a trace using the GUI, it would freeze consuming 100% CPU after
I clicked "start". Turned out this was because in tracecontrol.c's
start_clicked callback, you poll(2) on an FD and use a switch()
statement to handle its return.

Unfortunately, poll(2) doesn't work that way -- it returns a *mask* of
bits, not a single value. Here poll was returning POLLIN | POLLHUP to
indicate there's data ready and the FD has been closed by the other
side, and since this != POLLIN and != POLLHUP, the poll loop spins
forever.

Attached is a patch to be applied to tracecontrol.c which fixes it to
check for set-bits instead. It's still strictly broken, as the read(fd,
buf, 256) call might not fully drain the child's output, but it's a step
in the right direction and means I can at least use the trace-control
thing.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Wed, 18 Nov 2009 16:52:39 +0000 (11:52 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Wed, 18 Nov 2009 15:53:54 +0000 (10:53 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Wed, 18 Nov 2009 05:37:38 +0000 (00:37 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Tue, 17 Nov 2009 21:57:22 +0000 (16:57 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoFix variable sized sb, update version
Mathieu Desnoyers [Tue, 17 Nov 2009 21:35:57 +0000 (16:35 -0500)] 
Fix variable sized sb, update version

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoFix alignment modification
Mathieu Desnoyers [Tue, 17 Nov 2009 19:28:13 +0000 (14:28 -0500)] 
Fix alignment modification

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoSupport variable sized subbuffers
Mathieu Desnoyers [Tue, 17 Nov 2009 19:24:42 +0000 (14:24 -0500)] 
Support variable sized subbuffers

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Tue, 17 Nov 2009 03:28:00 +0000 (22:28 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Tue, 17 Nov 2009 02:36:17 +0000 (21:36 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate version traceformat-2.4 v0.12.21
Mathieu Desnoyers [Tue, 17 Nov 2009 02:20:01 +0000 (21:20 -0500)] 
update version

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoUpdate trace format to 2.4
Mathieu Desnoyers [Mon, 16 Nov 2009 21:47:21 +0000 (16:47 -0500)] 
Update trace format to 2.4

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Mon, 16 Nov 2009 18:20:35 +0000 (13:20 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Sun, 15 Nov 2009 07:15:20 +0000 (02:15 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Sat, 14 Nov 2009 00:10:38 +0000 (19:10 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Fri, 13 Nov 2009 17:15:48 +0000 (12:15 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Fri, 13 Nov 2009 04:41:01 +0000 (23:41 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoUpdate version v0.12.20
Mathieu Desnoyers [Fri, 13 Nov 2009 01:56:02 +0000 (20:56 -0500)] 
Update version

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoChange __SIZEOF_LONG__ for __WORDSIZE
Mathieu Desnoyers [Thu, 12 Nov 2009 22:43:31 +0000 (17:43 -0500)] 
Change __SIZEOF_LONG__ for __WORDSIZE

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Thu, 12 Nov 2009 22:02:43 +0000 (17:02 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Tue, 10 Nov 2009 01:51:28 +0000 (20:51 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Mon, 9 Nov 2009 15:21:08 +0000 (10:21 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Tue, 3 Nov 2009 06:21:17 +0000 (01:21 -0500)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoRemove bashisms in runlttv
Benjamin Poirier [Thu, 29 Oct 2009 20:22:20 +0000 (16:22 -0400)] 
Remove bashisms in runlttv

Found using 'checkbashisms'

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
15 years agoput a little sanity in pixmap installation
Pierre-Marc Fournier [Mon, 19 Oct 2009 21:58:39 +0000 (17:58 -0400)] 
put a little sanity in pixmap installation

This makes pixmaps uninstall correctly and puts them in DATADIR/pixmaps/lttv.

15 years agoupdate compat
Mathieu Desnoyers [Fri, 23 Oct 2009 18:23:12 +0000 (14:23 -0400)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Fri, 23 Oct 2009 13:47:58 +0000 (09:47 -0400)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoFix shady indentation
Benjamin Poirier [Mon, 19 Oct 2009 19:33:04 +0000 (15:33 -0400)] 
Fix shady indentation

What are you trying to hide?

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
15 years agoFix use after free of "filter/expression" attribute
Benjamin Poirier [Mon, 19 Oct 2009 19:33:03 +0000 (15:33 -0400)] 
Fix use after free of "filter/expression" attribute

As evidenced by Valgrind:
 Invalid read of size 4
    at 0x402E248: process_traceset (batchAnalysis.c:103)
    by 0x80558E5: lttv_hooks_call (hook.c:272)
    by 0x8053596: main (main.c:219)
  Address 0x4cea1b8 is 88 bytes inside a block of size 256 free'd
    at 0x4024D47: realloc (vg_replace_malloc.c:476)
[...]
    by 0x402E204: process_traceset (batchAnalysis.c:97)
    by 0x80558E5: lttv_hooks_call (hook.c:272)
    by 0x8053596: main (main.c:219)

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
15 years agoMove "active" code out of debug statements
Benjamin Poirier [Mon, 19 Oct 2009 19:33:02 +0000 (15:33 -0400)] 
Move "active" code out of debug statements

Certain g_assert() statements contained expressions that modify the rest of
the program state (eg. modifying variables). As stated in the GLib reference,
g_assert() is a macro that can be compiled out. This would change the behavior
of an otherwise correct lttv.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Sun, 18 Oct 2009 23:31:23 +0000 (19:31 -0400)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
15 years agoupdate compat
Mathieu Desnoyers [Sat, 17 Oct 2009 22:14:20 +0000 (18:14 -0400)] 
update compat

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
This page took 0.047667 seconds and 4 git commands to generate.