Commit Graph
28 Commits
Author SHA1 Message Date
Laurent THOMAS f50d5f5a9b make multiple config instead of one implicit global 2023-11-10 10:23:11 +01:00
Cedric Roux 0618812554 T tracer: simplify
- don't call exit() if get_message() fails, simply terminate the thread and
  disable the T tracer
- T_dont_fork disappears, monitor_and_kill() as well, so now it's only 2
  processes: the main (enb/gnb/ue) and the local tracer
2022-08-16 14:44:23 +02:00
Robert Schmidt 57cfd7bc32 Remove basic simulator
The basic simulator can be replaced with the RF simulator. Use option
--rfsim.
2022-03-17 08:25:16 +01:00
Cedric Roux 0806734254 T tracer: add option to have both T traces and regular console logs
Use --T_stdout 2 to have both.

--T_stdout 0 is still the way to have only T traces and no console logs.
2022-01-11 11:04:00 +01:00
frtabu d171e18c1e fix some cppcheck errors and warnings in config module and T Tracer 2019-01-22 22:43:33 +01:00
frtabu e329ba787c fix command line parsing for config_getlist, also improve help processing and fix probe (opt) parameters processing 2019-01-22 22:43:33 +01:00
Cedric Roux 0019707cd1 T: fix early logs
The variable T_stdout needs to be 1 at startup to avoid missing logs.
2019-01-14 16:28:16 +01:00
Cedric Roux 475d5eb827 T: bug fixes for the T cache
- 'busy' has to be handled in a more atomic fashion to avoid crazy
  runtime race conditions
- the basic simulator is too fast sometimes; rewrite the accesses to
  the T cache to avoid there again crazy behaviors

Hopefully that's better...
2018-08-17 12:25:13 +02:00
Cedric Roux 4054330191 minor: remove TABs 2018-08-17 12:24:39 +02:00
Cedric Roux f18a438c2c T: simplify
Don't use shm anymore. Use mmap directly.
2018-08-13 11:28:56 +02:00
Raymond Knopp 3539761c28 Log review step 1: legacy VCD removal, LOG macro modified, TTracer enabled at build time by default, in a way it, by default configuration, provides console logs, as in previous versions 2018-07-13 16:43:34 +02:00
oai bfecc0110b Remove compilation warnings, also fix telnet server compilation failure and NB-IoT shared lib compilation failure introduced when reviewing L1 sources organization 2018-07-05 17:37:38 +02:00
Cedric Roux c14dd7ffbb T: use PID for the SHM name
That allows to run several programs using this mechanism on the
same computer (say both eNB and UE, to debug).
2018-04-24 14:53:12 +02:00
Cedric Roux 7576e3fa52 T: bugfix: fix check on return value of mmap 2018-04-24 14:40:28 +02:00
Cedric Roux 6d7a1a1623 minor: improve T tracer logs 2017-10-11 11:40:42 +02:00
Cedric Roux 3d78e5a34b add option --T_dont_fork to tracee (lte-softmodem, oaisim)
The T has 2 processes: the tracee and the local tracer
if the tracee dies (segfault or whatever) the tracee
may still be running.

So there is a third process that monitors those two others
and kill everything when one dies.

The problem is that this third process has to be the parent
of the two others. That makes debugging the tracee with gdb
impossible. This new option disables the third monitor process.
2016-06-28 12:50:58 +02:00
Cedric Roux bb051c0219 T_messages.txt is now sent by local_tracer.c
And it's sent at each connection attempt.
Before it was sent only once to the first tracer.
Plus there was a bug (length:(len) should have been length:(send_size)).
2016-06-23 11:09:05 +02:00
Cedric Roux e0966584cf monitor tracee and local tracer to avoid "dead" processes
this may be removed at some point, it's very brutal. But when you
write some code, it may happen (it "may"!!) that *sometimes* the
code does not work and crashes. In thoses cases I prefer the
local tracer (or the tracee) to go away immediately without even
thinking about it maybe still running in the background.

In case of monitoring (as opposed to debugging) maybe it's preferable
to let the process live its life as it wants.

Time will tell.
2016-06-06 12:30:50 +02:00
Cedric Roux 18c2bdda98 don't abord if read fails in get_message
it may legitimately happen when the tracee is ctrl+c'ed.
Let's print something though because read may fail for
other reasons. Why not?
2016-06-05 17:47:08 +02:00
Cedric Roux 358a37910c put local tracer in tracee
plus some cleanup here and there
2016-06-01 15:42:29 +02:00
Cedric Roux 05afc953e8 cleanup - _T_cache variable had no place here... 2016-05-31 18:50:01 +02:00
Cedric Roux 6b9db37802 start integrating local tracer directly into tracee
first step: let the tracee connect before the remote tracer
and let's have a "no wait" mode where the local tracer starts
the tracee before the remote tracer is connected
2016-05-31 17:06:45 +02:00
Cedric Roux a5e63b2726 rename T_SEND to T_COMMIT, sounds better
get rid of T_send(), no use anymore
2016-05-31 15:56:35 +02:00
Cedric Roux 3a71ecb759 remove T_USE_SHARED_MEMORY
The T only works when it's TRUE, the version without shared memory
is not supported anymore.
2016-05-31 15:47:55 +02:00
Cedric Roux 2e64d54e9e the tracee (lte-softmodem) now sends the content of T_messages.txt
as special events.

If we store all received events to a file, this dump is now
self-contained. Helps to analyze traces.

Some functions have also been factorized in the process, too much
duplication.

(Also tracer/Makefile was forgotten in previous commit, included
in this one...)
2016-05-25 14:15:47 +02:00
Cedric Roux e6d5f22c8b add message 1 to the T
This message sends configuration for all events.
2016-05-01 22:39:23 +02:00
Cedric Roux 4e88857b27 let the soft-modem (or the program being traced, whatever it is) try
to connect until it succeeds
2016-04-25 17:27:22 +02:00
Cedric Roux f9d740eee6 first commit of the T - review this commit, many things should
probably not be here.
2016-04-10 17:01:22 +02:00