Page MenuHomeFreeBSD

Speed up devel/gdb startup on FreeBSD
ClosedPublic

Authored by jhb on Oct 5 2018, 12:06 AM.
Tags
None
Referenced Files
F104181182: D17426.id51671.diff
Wed, Dec 4, 11:07 AM
Unknown Object (File)
Mon, Nov 25, 5:13 PM
Unknown Object (File)
Fri, Nov 22, 1:18 PM
Unknown Object (File)
Thu, Nov 21, 2:21 PM
Unknown Object (File)
Wed, Nov 6, 8:51 PM
Unknown Object (File)
Tue, Nov 5, 10:12 PM
Unknown Object (File)
Tue, Nov 5, 10:12 PM
Unknown Object (File)
Tue, Nov 5, 10:12 PM

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
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 21285
Build 20620: arc lint + arc unit

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.
  • 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

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.
devel/gdb/files/commit-93579f6f90
16

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.