]> git.puffer.fish Git - matthieu/frr.git/commit
lib: unstupidify thread debug information
authorDavid Lamparter <equinox@opensourcerouting.org>
Mon, 18 Nov 2013 22:04:27 +0000 (23:04 +0100)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 30 May 2016 00:08:52 +0000 (20:08 -0400)
commit9c7753e41a590c9186adb3c836d6ff6f56e6715f
tree6684654f9f30b03ff588960f50908e8898aedfde
parent63b75cdd34d01838049af3cd61b0bd760f44cafe
lib: unstupidify thread debug information

the library's thread scheduling functions keep track of the thread
function's name, so far so good.  However, copying the compiler-provided
constant into a buffer inside the thread structure is plain useless.
Also, strip_funcname() was trying to support something that never
happens.

Instead, let's use some bytes here to track where threads are scheduled
from.  Another commit will print that information on crashes.

Ripping out useless stuff:  -64 bytes in the thread structure
Re-add as const ptr:         +8 bytes
Extra debug info:           +12 bytes

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 3493b7731b750cbc62f00be94b624a08ccccf0b2)
lib/thread.c
lib/thread.h