Page MenuHomeFreeBSD

Speed up devel/gdb startup on FreeBSD
ClosedPublic

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

Details

Summary

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

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

Event Timeline

mmacy added reviewers: jhb, jmd.Oct 5 2018, 12:25 AM
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
jhb added a comment.Nov 30 2018, 11: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.

jhb updated this revision to Diff 51452.Nov 30 2018, 11:25 PM
  • Use patch from upstream commit.
  • Bump PORTREVISION.
pizzamig requested changes to this revision.Dec 5 2018, 1:13 PM
pizzamig added a subscriber: pizzamig.

Patch doesn't apply cleanly.

devel/gdb/files/commit-93579f6f90
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 updated this revision to Diff 51623.Dec 5 2018, 6:48 PM

Drop ChangeLog diff.

jhb commandeered this revision.Dec 5 2018, 6:49 PM
jhb edited reviewers, added: git_bdragon.rtk0.net; removed: jhb.
jhb added inline comments.
devel/gdb/files/commit-93579f6f90
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
pizzamig accepted this revision.Dec 6 2018, 4:53 PM

look good to me

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.