Re: Kernel symbol file alternate location
On 5 August 2010 12:41, Daniel O'Connor docon...@gsoft.com.au wrote: Is it possible to tell installkernel to put the symbol files elsewhere? IMO somewhere in /usr would be good - you don't need them to boot (or crashdump, etc) and they increase the size of the kernel by a factor of 5(!), eg.. [cain 14:07] /tmp du -sh kernel 258M kernel [cain 14:07] /tmp rm -f kernel/*.symbols [cain 14:07] /tmp du -sh kernel 50M kernel Why not add support to the relevant libraries/code to support reading compressed symbol files? Adrian ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: Kernel symbol file alternate location
On 13/08/2010, at 10:43, Adrian Chadd wrote: [cain 14:07] /tmp rm -f kernel/*.symbols [cain 14:07] /tmp du -sh kernel 50Mkernel Why not add support to the relevant libraries/code to support reading compressed symbol files? Hmm, it does make a rather massive difference.. 206Mb - 55Mb compressed(!) Unfortunately I have no idea how to go about it :( -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au The nice thing about standards is that there are so many of them to choose from. -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
Re: Kernel symbol file alternate location
On 08/06/2010 06:19, Oliver Fromme wrote: Kostik Belousov kostik...@gmail.com wrote: If you keep /usr/obj around, you do not need symbol files at all, and INSTALL_NODEBUG?=true in make.conf is enough. You can always use kernel.debug and modules with debugging symbols from build directory for kgdb. OK ... But that won't work for /boot/kernel.old. Best regards Oliver kernel /boot/kernel symbols /boot/sym When kernel is upgraded old kernel and sym becomes /boot/kernel.old /boot/sym.old If I remember correctly in a recent backtrace that I have tried when I used /boot/kernel.old/kernel the symbols ended up loading from /boot/kernel anyway and not the kernel.old directory. So whether these are moved to a different location or not I do not believe it will make that much of a difference on where they are loaded from. I may be wrong about this. IMO creating symlink's is going to be a bad way to handle this and adjusting the respective utilities that use the symbols is a much more permanent and failure safe way to go about this. Besides moving the location of the symbols and having a debugging utility or crash dump utility fail is not really a mission critical failure and would be able to be found and corrected fairly quick among the amount of people that are using these. $0.02 US Regards, -- jhell,v ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: Kernel symbol file alternate location
Daniel O'Connor wrote: On 06/08/2010, at 2:38, Oliver Fromme wrote: I think this is the main reason / has had to grow - the actual kernel is relatively small so even a 256Mb / could hold several, but with the symbol files it is not possible. I think a very simple solution would be to install the symbol files elsewhere (probably configurable via make.conf), and install symlinks in the kernel directory. If you do this, tools using the symbol files won't have to be changed. This would probably be a fairly trivial change to the install- kernel target, I guess. I don't have patches, though. Yeah, I don't think it's hard to move them, however I'm worried what it will break :) The only thing I can see that would have to change would be kgdb so it tells gdb where to find the symbols. That's why I suggested to place symlinks in the kernel directory. No change to kgdb necessary. It might even be possible to not install the symbol files at all, but keep them under /usr/obj, so the installkernel target would have to do nothing more than create symlinks. This could be controlled by a make.conf variable, like SYMLINK_SYMBOLS=YES (NO would be the existing behaviour of installing the actual symbol files in /boot/kernel). Best regards Oliver -- Oliver Fromme, secnetix GmbH Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: Kernel symbol file alternate location
On 06/08/2010, at 16:59, Oliver Fromme wrote: Yeah, I don't think it's hard to move them, however I'm worried what it will break :) The only thing I can see that would have to change would be kgdb so it tells gdb where to find the symbols. That's why I suggested to place symlinks in the kernel directory. No change to kgdb necessary. Ahh of course. Although that does make it harder because you have to modify all the links when the old kernel is moved out of the way. It might even be possible to not install the symbol files at all, but keep them under /usr/obj, so the installkernel target would have to do nothing more than create symlinks. This could be controlled by a make.conf variable, like SYMLINK_SYMBOLS=YES (NO would be the existing behaviour of installing the actual symbol files in /boot/kernel). Hmm, I think they would need to go elsewhere otherwise they wouldn't be available to people who do binary installs, hence the usefulness of bug reports would go down. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au The nice thing about standards is that there are so many of them to choose from. -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
Re: Kernel symbol file alternate location
Daniel O'Connor wrote: On 06/08/2010, at 16:59, Oliver Fromme wrote: Yeah, I don't think it's hard to move them, however I'm worried what it will break :) The only thing I can see that would have to change would be kgdb so it tells gdb where to find the symbols. That's why I suggested to place symlinks in the kernel directory. No change to kgdb necessary. Ahh of course. Although that does make it harder because you have to modify all the links when the old kernel is moved out of the way. Right. Maybe make a symlink to a directory, so only that symlink has to be changed: /boot/kernel/symbols - /var/db/symbols/kernel /boot/kernel/kernel.symbols - symbols/kernel.symbols /boot/kernel/acpi.symbols - symbols/acpi.symbols .. and so on. When the kernel is rotated to kernel.old, only one symlink has to be changed: /boot/kernel.old/symbols - /var/db/symbols/kernel.old Of course, /var/db is just an example off the top of my head. The symbols directory should be configurable via make.conf, too. It might even be possible to not install the symbol files at all, but keep them under /usr/obj, so the installkernel target would have to do nothing more than create symlinks. This could be controlled by a make.conf variable, like SYMLINK_SYMBOLS=YES (NO would be the existing behaviour of installing the actual symbol files in /boot/kernel). Hmm, I think they would need to go elsewhere otherwise they wouldn't be available to people who do binary installs, hence the usefulness of bug reports would go down. Right, I was thinking of developers only, who usually have a populated /usr/obj directory ... But there's a world full of non-developers, too. :-) Best regards Oliver -- Oliver Fromme, secnetix GmbH Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd IRIX is about as stable as a one-legged drunk with hypothermia in a four-hundred mile per hour wind, balancing on a banana peel on a greased cookie sheet -- when someone throws him an elephant with bad breath and a worse temper. -- Ralf Hildebrandt ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: Kernel symbol file alternate location
On Fri, Aug 06, 2010 at 09:29:31AM +0200, Oliver Fromme wrote: Daniel O'Connor wrote: On 06/08/2010, at 2:38, Oliver Fromme wrote: I think this is the main reason / has had to grow - the actual kernel is relatively small so even a 256Mb / could hold several, but with the symbol files it is not possible. I think a very simple solution would be to install the symbol files elsewhere (probably configurable via make.conf), and install symlinks in the kernel directory. If you do this, tools using the symbol files won't have to be changed. This would probably be a fairly trivial change to the install- kernel target, I guess. I don't have patches, though. Yeah, I don't think it's hard to move them, however I'm worried what it will break :) The only thing I can see that would have to change would be kgdb so it tells gdb where to find the symbols. That's why I suggested to place symlinks in the kernel directory. No change to kgdb necessary. It might even be possible to not install the symbol files at all, but keep them under /usr/obj, so the installkernel target would have to do nothing more than create symlinks. This could be controlled by a make.conf variable, like SYMLINK_SYMBOLS=YES (NO would be the existing behaviour of installing the actual symbol files in /boot/kernel). If you keep /usr/obj around, you do not need symbol files at all, and INSTALL_NODEBUG?=true in make.conf is enough. You can always use kernel.debug and modules with debugging symbols from build directory for kgdb. pgpaoijv6x887.pgp Description: PGP signature
Re: Kernel symbol file alternate location
Kostik Belousov kostik...@gmail.com wrote: If you keep /usr/obj around, you do not need symbol files at all, and INSTALL_NODEBUG?=true in make.conf is enough. You can always use kernel.debug and modules with debugging symbols from build directory for kgdb. OK ... But that won't work for /boot/kernel.old. Best regards Oliver -- Oliver Fromme, secnetix GmbH Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd It's trivial to make fun of Microsoft products, but it takes a real man to make them work, and a God to make them do anything useful. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: Kernel symbol file alternate location
On 06/08/2010, at 17:45, Oliver Fromme wrote: Daniel O'Connor wrote: On 06/08/2010, at 16:59, Oliver Fromme wrote: Yeah, I don't think it's hard to move them, however I'm worried what it will break :) The only thing I can see that would have to change would be kgdb so it tells gdb where to find the symbols. That's why I suggested to place symlinks in the kernel directory. No change to kgdb necessary. Ahh of course. Although that does make it harder because you have to modify all the links when the old kernel is moved out of the way. Right. Maybe make a symlink to a directory, so only that symlink has to be changed: /boot/kernel/symbols - /var/db/symbols/kernel /boot/kernel/kernel.symbols - symbols/kernel.symbols /boot/kernel/acpi.symbols - symbols/acpi.symbols .. and so on. When the kernel is rotated to kernel.old, only one symlink has to be changed: /boot/kernel.old/symbols - /var/db/symbols/kernel.old Of course, /var/db is just an example off the top of my head. The symbols directory should be configurable via make.conf, too. Yes that makes sense. I guess the next thing is to make patches :) Hmm, I think they would need to go elsewhere otherwise they wouldn't be available to people who do binary installs, hence the usefulness of bug reports would go down. Right, I was thinking of developers only, who usually have a populated /usr/obj directory ... But there's a world full of non-developers, too. :-) Yeah and they find lots of bugs :( -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au The nice thing about standards is that there are so many of them to choose from. -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
Re: Kernel symbol file alternate location
Quoth Daniel O'Connor on Thursday, 05 August 2010: Is it possible to tell installkernel to put the symbol files elsewhere? IMO somewhere in /usr would be good - you don't need them to boot (or crashdump, etc) and they increase the size of the kernel by a factor of 5(!), eg.. [cain 14:07] /tmp du -sh kernel 258Mkernel [cain 14:07] /tmp rm -f kernel/*.symbols [cain 14:07] /tmp du -sh kernel 50Mkernel One downside is that you need to keep them in sync which is a bit of a drag, however I think most people use installworld for upgrades/builds so it would generally not be an issue. I think this is the main reason / has had to grow - the actual kernel is relatively small so even a 256Mb / could hold several, but with the symbol files it is not possible. I don't have patches to do this though :) -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au The nice thing about standards is that there are so many of them to choose from. -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C +1 to this idea. I'm currently building without symbols so I don't have to clean them out of kernel.old every time I do an installkernel. -- Sterling (Chip) Camden| sterl...@camdensoftware.com | 2048D/3A978E4F http://camdensoftware.com | http://chipstips.com| http://chipsquips.com pgpFMRpmWLk0h.pgp Description: PGP signature
Re: Kernel symbol file alternate location
Daniel O'Connor wrote: Is it possible to tell installkernel to put the symbol files elsewhere? I wondered the same. IMO somewhere in /usr would be good - you don't need them to boot (or crashdump, etc) and they increase the size of the kernel by a factor of 5(!), eg.. [cain 14:07] /tmp du -sh kernel 258Mkernel [cain 14:07] /tmp rm -f kernel/*.symbols [cain 14:07] /tmp du -sh kernel 50Mkernel One downside is that you need to keep them in sync which is a bit of a drag, however I think most people use installworld for upgrades/builds so it would generally not be an issue. I think this is the main reason / has had to grow - the actual kernel is relatively small so even a 256Mb / could hold several, but with the symbol files it is not possible. I think a very simple solution would be to install the symbol files elsewhere (probably configurable via make.conf), and install symlinks in the kernel directory. If you do this, tools using the symbol files won't have to be changed. This would probably be a fairly trivial change to the install- kernel target, I guess. I don't have patches, though. Best regards Oliver -- Oliver Fromme, secnetix GmbH Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd File names are infinite in length, where infinity is set to 255 characters. -- Peter Collinson, The Unix File System ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: Kernel symbol file alternate location
On 06/08/2010, at 2:38, Oliver Fromme wrote: I think this is the main reason / has had to grow - the actual kernel is relatively small so even a 256Mb / could hold several, but with the symbol files it is not possible. I think a very simple solution would be to install the symbol files elsewhere (probably configurable via make.conf), and install symlinks in the kernel directory. If you do this, tools using the symbol files won't have to be changed. This would probably be a fairly trivial change to the install- kernel target, I guess. I don't have patches, though. Yeah, I don't think it's hard to move them, however I'm worried what it will break :) The only thing I can see that would have to change would be kgdb so it tells gdb where to find the symbols. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au The nice thing about standards is that there are so many of them to choose from. -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C