Page MenuHomeFreeBSD

Speed up devel/gdb startup on FreeBSD

Authored by jhb on Oct 5 2018, 12:06 AM.



On non-Linux systems that do not have fdwalk(), gdb currently iterates over all possible file descriptors when checking for open files.
Fix this by adding a FreeBSD implementation using kinfo_getfile().

Fixes extremely long startup times on ppc64.

Diff Detail

rP FreeBSD ports repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

linimon retitled this revision from Speed up gdb startup on FreeBSD to Speed up devel/gdb startup on FreeBSD.Oct 9 2018, 3:22 PM

I've merged a similar change upstream to gdb in commit 93579f6f90. We can pull that into the port as a commit-<foo> patch.

  • Use patch from upstream commit.
pizzamig requested changes to this revision.Dec 5 2018, 1:13 PM
pizzamig added a subscriber: pizzamig.

Patch doesn't apply cleanly.

16 ↗(On Diff #51452)

This section of the patch fails, because the ChangeLog in the release is missing the latest changes.
I'd remove the Changelog diff from the patch

This revision now requires changes to proceed.Dec 5 2018, 1:13 PM
jhb edited reviewers, added: bdragon; removed: jhb.
jhb added inline comments.
16 ↗(On Diff #51452)

Oops, yes, I normally do that for 'commit-*' files and just missed this one.

jhb marked 2 inline comments as done.Dec 5 2018, 6:49 PM
This revision is now accepted and ready to land.Dec 6 2018, 4:53 PM
This revision was automatically updated to reflect the committed changes.