TimeDoctor tdlogger
Brought to you by:
ruttenm
| File | Date | Author | Commit |
|---|---|---|---|
| kernel_patch | 2011-12-18 |
|
[6e6209] Initial linux kernel module, kernel patch to cr... |
| .cproject | 2011-12-18 |
|
[6e6209] Initial linux kernel module, kernel patch to cr... |
| .project | 2011-12-18 |
|
[6e6209] Initial linux kernel module, kernel patch to cr... |
| COPYING | 2011-12-18 |
|
[45962e] Added GPL license |
| Makefile | 2011-12-18 |
|
[6e6209] Initial linux kernel module, kernel patch to cr... |
| README | 2011-12-18 |
|
[719aff] renamed to README |
| TD_logger.c | 2011-12-18 |
|
[45962e] Added GPL license |
| TD_logger.h | 2011-12-18 |
|
[45962e] Added GPL license |
| log2tdi | 2011-12-18 |
|
[45962e] Added GPL license |
TimeDoctor Logger Linux Component
---------------------------------
usage :
- compile the kernel module (TD_logger) : make
- patch your kernel to instrument with logging calls : see example modified fork.c and sched.c (look for #ifdef CONFIG_PHILIPS_LOG)
- insmod the logging module : (sudo) insmod TD_logger.ko
- the module uses procfs for interfacing (see TD_logger source for details) : echo reset | status | on | off > /proc/TimeDoctor
- a dump of the log buffer can be obtained by reading from /proc/TimeDoctor : cat /proc/TimeDoctor > trace.raw
- the raw buffer can be converted to a TDI file by using the script log2tdi : log2tdi trace.raw > trace.tdi
(N.B. potential endianess issues issues when target & host are different, see bytes2int32)
- trace.tdi can be viewed with the Eclipse TimeDoctor viewer
Todo :
- did not test the kernel patching, instead added some test logging to the 'on' command. (avoids recompiling kernel).
- Not sure how logging without the module installed works (instrumented kernel calls functions that are not yet there?)
- module now uses X86 TSC cycle counter ( rdtscll() ). This will not work on ARM, and has issues on X86 (sleep states, frequency changes).
A portable solution using high resolution timers might be better, could have performance impact, though.
- CONFIG_LOG_SIZE is now statically define in TD_logger.c Make this a (kernel) config option.
- The logging module starts logging only when the module is loaded initialized. For starting logging asap. see if the init can be done
earlier (e.g. using early_initcall(TD_BufferInit) )