Date: Mon, 02 Feb 2009 08:17:41 -0800 From: Matthew Fleming <matthew.fleming@isilon.com> To: John Baldwin <jhb@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: Dynamic ddb commands Message-ID: <1233591461.7789.25.camel@amaretto> In-Reply-To: <200902020846.33072.jhb@freebsd.org> References: <1233337318.13748.101.camel@amaretto> <1233339897.13748.106.camel@amaretto> <200902020846.33072.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> In general it is far easier to just add sysinit's than to hack directly on the > kernel linker. There are very few ddb commands, so one extra pointer or two > per command is not a lot of space. Respectfully, I disagree, for several reasons. First, in order to make sysinit and sysctl work, the kernel linker needed to know that there are a set of elf sections that have special meaning. Yes, using sysinits means that there are still only two elf sections of interest. Second, as I mentioned before, having ddb commands added mixed in with sysinits means that, if I have a bug in my sysinit I may not be able to use some of my ddb commands to debug it. Even if DB_*COMMAND used SI_ORDER_FIRST, any sysinit with the same priority may come first. Next, if you want commands sorted globally, it could be done with either implementation. But I think that commands that are defined by a module should be listed with others from that module. Last, changing struct command introduces a binary compatibility issue. Any older driver that had a ddb command (even if they never realized they couldn't access it) would need to be recompiled. I am not sure of FreeBSD's binary compatibility policy, though, and it would presumably be across a major OS revision number. So this is not a very compelling argument. Thanks, matthew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1233591461.7789.25.camel>