Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 18 Jun 2002 18:08:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 18 Jun 2002 18:08:30 -0400 Received: from fmr04.intel.com ([143.183.121.6]:31179 "EHLO caduceus.sc.intel.com") by vger.kernel.org with ESMTP id ; Tue, 18 Jun 2002 18:07:50 -0400 Message-Id: <200206182207.g5IM7eP04332@unix-os.sc.intel.com> From: mgross Reply-To: mgross@unix-os.sc.intel.com Organization: SSG Intel To: Linux Kernel Mailing List Subject: Re: [PATCH] Multi-threaded core dumps for 2.4.18 non-O(1) kernels. Date: Tue, 18 Jun 2002 15:15:00 -0400 X-Mailer: KMail [version 1.3.1] Cc: Marcelo , Linus Torvalds , mark.gross@intel.com References: <200206142133.g5ELXYP22784@unix-os.sc.intel.com> In-Reply-To: <200206142133.g5ELXYP22784@unix-os.sc.intel.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="------------Boundary-00=_0H1XY8CDL6XZDLCMTNFX" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 37623 Lines: 517 --------------Boundary-00=_0H1XY8CDL6XZDLCMTNFX Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 8bit Updated version fixing the redundant collection of the current tasks' register state as noted by Vamsi Krishna. See attached. --mgross On Friday 14 June 2002 02:40 pm, mgross wrote: > The following patch is a back port of the 2.5.18 tcore patch I posted last > week. > > It applies cleanly to the 2.4.18 base tree. > > It has some warnings and one simple regection when applied to the > 2.4.18-ia64 tree due to a patch collision with the ia64 patch. I have a > ia64 version of this patch available, upon request, which will apply > cleanly to the ia64 kernel. > > This patch has been tested on SMP and UP i386 architectures and works very > well. The ia64 SMP version has also been tested and works very well. > > To use this patch you will need to strip the objects from the libpthread > module loaded by GDB at post mortem debug time. > ('strip /lib/libpthread-0.9.so for my system', YMMV) > > I would like to see this feature added to the linux kernel. Support for > multi-threaded core dumps has been in Solaris for a LONG time now, and its > silly for it to not exist in Linux. ISV's need this type of support from > the kernel. > > Please apply this patch. Its a good thing. > > --mgross --------------Boundary-00=_0H1XY8CDL6XZDLCMTNFX Content-Type: text/x-diff; charset="iso-8859-15"; name="tcore-2418-061802.pat" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="tcore-2418-061802.pat" ZGlmZiAtdXJOIC1YIGRvbnRkaWZmIGxpbnV4LTIuNC4xOC9hcmNoL2kzODYva2VybmVsL2kzODcu YyBsaW51eDI0MTgudGNvcmUvYXJjaC9pMzg2L2tlcm5lbC9pMzg3LmMKLS0tIGxpbnV4LTIuNC4x OC9hcmNoL2kzODYva2VybmVsL2kzODcuYwlGcmkgRmViIDIzIDEzOjA5OjA4IDIwMDEKKysrIGxp bnV4MjQxOC50Y29yZS9hcmNoL2kzODYva2VybmVsL2kzODcuYwlUaHUgSnVuIDEzIDEwOjAwOjQ4 IDIwMDIKQEAgLTUyMCwzICs1MjAsNDQgQEAKIAogCXJldHVybiBmcHZhbGlkOwogfQorCitpbnQg ZHVtcF90YXNrX2ZwdSggc3RydWN0IHRhc2tfc3RydWN0ICp0c2ssIHN0cnVjdCB1c2VyX2kzODdf c3RydWN0ICpmcHUgKQoreworCWludCBmcHZhbGlkOworCisJZnB2YWxpZCA9IHRzay0+dXNlZF9t YXRoOworCWlmICggZnB2YWxpZCApIHsKKwkJaWYgKHRzayA9PSBjdXJyZW50KSB1bmxhenlfZnB1 KCB0c2sgKTsKKwkJaWYgKCBjcHVfaGFzX2Z4c3IgKSB7CisJCQljb3B5X2ZwdV9meHNhdmUoIHRz aywgZnB1ICk7CisJCX0gZWxzZSB7CisJCQljb3B5X2ZwdV9mc2F2ZSggdHNrLCBmcHUgKTsKKwkJ fQorCX0KKworCXJldHVybiBmcHZhbGlkOworfQorCitpbnQgZHVtcF90YXNrX2V4dGVuZGVkX2Zw dSggc3RydWN0IHRhc2tfc3RydWN0ICp0c2ssIHN0cnVjdCB1c2VyX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- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/