public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug exp/12705] New: Extremely poor performance when printing large arrays
@ 2011-04-26 17:08 andrewg at cray dot com
2011-05-06 17:51 ` [Bug exp/12705] " andrewg at cray dot com
0 siblings, 1 reply; 2+ messages in thread
From: andrewg at cray dot com @ 2011-04-26 17:08 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12705
Summary: Extremely poor performance when printing large arrays
Product: gdb
Version: HEAD
Status: NEW
Severity: critical
Priority: P2
Component: exp
AssignedTo: unassigned@sourceware.org
ReportedBy: andrewg@cray.com
I noticed that when I wanted to print out a very large array, the performance
was unbearably slow. This can be observed by setting print repeats and print
elements to 0 (unlimited) and then attempting to print a large array.
set print repeats 0
set print elements 0
I discovered this behavior while attempting to directly parse a very large
array's value directly using gdb/mi with the command -data-evaluate-expression.
The following is a patch which fixes this issue:
[andrewg@kaibab] gdb $ cvs diff -cp valprint.c
Index: valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/valprint.c,v
retrieving revision 1.110
diff -c -p -r1.110 valprint.c
*** valprint.c 14 Feb 2011 11:35:45 -0000 1.110
--- valprint.c 26 Apr 2011 16:57:39 -0000
*************** val_print_array_elements (struct type *t
*** 1247,1261 ****
rep1 = i + 1;
reps = 1;
! while (rep1 < len
&& value_available_contents_eq (val,
embedded_offset + i * eltlen,
val,
embedded_offset + rep1 * eltlen,
eltlen))
! {
! ++reps;
! ++rep1;
}
if (reps > options->repeat_count_threshold)
--- 1247,1267 ----
rep1 = i + 1;
reps = 1;
!
! /* Only check for reps if repeat_count_threshold is not set to
! UINT_MAX (unlimited) */
! if (options->repeat_count_threshold < UINT_MAX)
! {
! while (rep1 < len
&& value_available_contents_eq (val,
embedded_offset + i * eltlen,
val,
embedded_offset + rep1 * eltlen,
eltlen))
! {
! ++reps;
! ++rep1;
! }
}
if (reps > options->repeat_count_threshold)
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug exp/12705] Extremely poor performance when printing large arrays
2011-04-26 17:08 [Bug exp/12705] New: Extremely poor performance when printing large arrays andrewg at cray dot com
@ 2011-05-06 17:51 ` andrewg at cray dot com
0 siblings, 0 replies; 2+ messages in thread
From: andrewg at cray dot com @ 2011-05-06 17:51 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12705
Andrew Gontarek <andrewg at cray dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Andrew Gontarek <andrewg at cray dot com> 2011-05-06 17:50:52 UTC ---
The patch for this bug was accepted into gdb.
See the following for more information:
http://sourceware.org/ml/gdb-patches/2011-04/msg00566.html
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-06 17:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-26 17:08 [Bug exp/12705] New: Extremely poor performance when printing large arrays andrewg at cray dot com
2011-05-06 17:51 ` [Bug exp/12705] " andrewg at cray dot com
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).