public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Getting core estimate for "gcore" command and conversely gcore/generate-core-file in GDB
@ 2023-09-05 18:25 SCOTT FIELDS
  2023-09-05 18:41 ` SCOTT FIELDS
  2023-09-08 16:56 ` Tom Tromey
  0 siblings, 2 replies; 6+ messages in thread
From: SCOTT FIELDS @ 2023-09-05 18:25 UTC (permalink / raw)
  To: gdb

[-- Attachment #1: Type: text/plain, Size: 462 bytes --]

Are there other commands that will estimate the current space required for a successful run of "gcore"?

Neither "gcore" command or gcore/generate-core-file command in GDB provide any option to get such an estimate.

Has there been a request to get this kind of information from "gcore" as a future enhancement, since it can be difficult to know just how much space a large running process actually needs.

Scott Fields
Kyndryl
Senior Lead SRE - BNSF


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Getting core estimate for "gcore" command and conversely gcore/generate-core-file in GDB
  2023-09-05 18:25 Getting core estimate for "gcore" command and conversely gcore/generate-core-file in GDB SCOTT FIELDS
@ 2023-09-05 18:41 ` SCOTT FIELDS
  2023-09-08 16:56 ` Tom Tromey
  1 sibling, 0 replies; 6+ messages in thread
From: SCOTT FIELDS @ 2023-09-05 18:41 UTC (permalink / raw)
  To: gdb

[-- Attachment #1: Type: text/plain, Size: 455 bytes --]

Are there other commands that will estimate the current space required for a successful run of "gcore"?

Neither "gcore" command or gcore/generate-core-file command in GDB provide any option to get such an estimate.

Has there been a request to get this kind of information from "gcore" as a future enhancement, since it can be difficult to know just how much space a large running process actually needs.

Scott Fields
Kyndryl
Senior Lead SRE


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Getting core estimate for "gcore" command and conversely gcore/generate-core-file in GDB
  2023-09-05 18:25 Getting core estimate for "gcore" command and conversely gcore/generate-core-file in GDB SCOTT FIELDS
  2023-09-05 18:41 ` SCOTT FIELDS
@ 2023-09-08 16:56 ` Tom Tromey
  2023-09-08 17:07   ` Luis Machado
  2023-09-08 17:29   ` SCOTT FIELDS
  1 sibling, 2 replies; 6+ messages in thread
From: Tom Tromey @ 2023-09-08 16:56 UTC (permalink / raw)
  To: SCOTT FIELDS via Gdb; +Cc: gdb, SCOTT FIELDS

>>>>> SCOTT FIELDS via Gdb <gdb@sourceware.org> writes:

> Are there other commands that will estimate the current space required
> for a successful run of "gcore"?  Neither "gcore" command or
> gcore/generate-core-file command in GDB provide any option to get such
> an estimate.

> Has there been a request to get this kind of information from "gcore"
> as a future enhancement, since it can be difficult to know just how
> much space a large running process actually needs.

I've never heard such a request.

Looking at gcore.c, it seems reasonably possible to implement this.
Look at gcore_create_callback to see how it decides how to size the
various sections.  Without trying, it is hard to say if there is some
hidden gotcha.

Tom

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Getting core estimate for "gcore" command and conversely gcore/generate-core-file in GDB
  2023-09-08 16:56 ` Tom Tromey
@ 2023-09-08 17:07   ` Luis Machado
  2023-09-08 17:29   ` SCOTT FIELDS
  1 sibling, 0 replies; 6+ messages in thread
From: Luis Machado @ 2023-09-08 17:07 UTC (permalink / raw)
  To: Tom Tromey, SCOTT FIELDS via Gdb; +Cc: gdb, SCOTT FIELDS

On 9/8/23 17:56, Tom Tromey wrote:
>>>>>> SCOTT FIELDS via Gdb <gdb@sourceware.org> writes:
> 
>> Are there other commands that will estimate the current space required
>> for a successful run of "gcore"?  Neither "gcore" command or
>> gcore/generate-core-file command in GDB provide any option to get such
>> an estimate.
> 
>> Has there been a request to get this kind of information from "gcore"
>> as a future enhancement, since it can be difficult to know just how
>> much space a large running process actually needs.
> 
> I've never heard such a request.
> 
> Looking at gcore.c, it seems reasonably possible to implement this.
> Look at gcore_create_callback to see how it decides how to size the
> various sections.  Without trying, it is hard to say if there is some
> hidden gotcha.

I'd expect some help from the arch-specific code will be needed to add things like
memory tag data and sizes of register sets. But otherwise it should be fairly doable.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Getting core estimate for "gcore" command and conversely gcore/generate-core-file in GDB
  2023-09-08 16:56 ` Tom Tromey
  2023-09-08 17:07   ` Luis Machado
@ 2023-09-08 17:29   ` SCOTT FIELDS
  2023-09-08 22:41     ` Tom Tromey
  1 sibling, 1 reply; 6+ messages in thread
From: SCOTT FIELDS @ 2023-09-08 17:29 UTC (permalink / raw)
  To: Tom Tromey, SCOTT FIELDS via Gdb; +Cc: gdb

Where would I need to make a feature request for this?

-----Original Message-----
From: Tom Tromey <tom@tromey.com> 
Sent: Friday, September 8, 2023 11:56 AM
To: SCOTT FIELDS via Gdb <gdb@sourceware.org>
Cc: gdb@gnu.org; SCOTT FIELDS <Scott.Fields@kyndryl.com>
Subject: [EXTERNAL] Re: Getting core estimate for "gcore" command and conversely gcore/generate-core-file in GDB

>>>>> SCOTT FIELDS via Gdb <gdb@sourceware.org> writes:

> Are there other commands that will estimate the current space required 
> for a successful run of "gcore"?  Neither "gcore" command or 
> gcore/generate-core-file command in GDB provide any option to get such 
> an estimate.

> Has there been a request to get this kind of information from "gcore"
> as a future enhancement, since it can be difficult to know just how 
> much space a large running process actually needs.

I've never heard such a request.

Looking at gcore.c, it seems reasonably possible to implement this.
Look at gcore_create_callback to see how it decides how to size the various sections.  Without trying, it is hard to say if there is some hidden gotcha.

Tom

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Getting core estimate for "gcore" command and conversely gcore/generate-core-file in GDB
  2023-09-08 17:29   ` SCOTT FIELDS
@ 2023-09-08 22:41     ` Tom Tromey
  0 siblings, 0 replies; 6+ messages in thread
From: Tom Tromey @ 2023-09-08 22:41 UTC (permalink / raw)
  To: SCOTT FIELDS; +Cc: Tom Tromey, SCOTT FIELDS via Gdb, gdb

> Where would I need to make a feature request for this?

Well, you can file it in Bugzilla, but I should warn you that there
isn't really anybody who prowls Bugzilla looking for things to do.  That
is, if you want this, you're probably best off writing it yourself.

For it to go in, I suppose it would need some kind of rationale and/or
user interface.

thanks,
Tom

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-09-08 22:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-05 18:25 Getting core estimate for "gcore" command and conversely gcore/generate-core-file in GDB SCOTT FIELDS
2023-09-05 18:41 ` SCOTT FIELDS
2023-09-08 16:56 ` Tom Tromey
2023-09-08 17:07   ` Luis Machado
2023-09-08 17:29   ` SCOTT FIELDS
2023-09-08 22:41     ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).