Page MenuHomeFreeBSD

db show pte: use pmap of kdb_thread
ClosedPublic

Authored by rlibby on Feb 17 2017, 7:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 2 2024, 8:17 PM
Unknown Object (File)
Dec 20 2023, 8:05 AM
Unknown Object (File)
Dec 15 2023, 5:06 PM
Unknown Object (File)
Oct 15 2023, 9:50 PM
Unknown Object (File)
Sep 26 2023, 12:31 AM
Unknown Object (File)
Jul 30 2023, 12:58 PM
Unknown Object (File)
Jul 27 2023, 9:22 PM
Unknown Object (File)
May 7 2023, 9:12 AM
Subscribers
None

Details

Summary

db show pte: use pmap of kdb_thread

show pte from the pmap of the process of the current DDB thread,
instead of necessarily the PCPU pmap.

I was using this to debug a bug I thought might have been a stale TLB
entry after switching threads (it turned out not to be).

Test Plan

Break into debugger, show pte on a user address, switch threads,
repeat.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rlibby retitled this revision from to db show pte: use pmap of kdb_thread.
rlibby updated this object.
rlibby edited the test plan for this revision. (Show Details)
rlibby added a reviewer: kib.
kib edited edge metadata.
kib added inline comments.
sys/amd64/amd64/pmap.c
7264 ↗(On Diff #25295)

I think that checks for td_proc != NULL and later are somewhat excessive. After proc0 initialization, curpmap != NULL and no thread with NULL td_proc exists. But sure it is innocent.

This revision is now accepted and ready to land.Feb 17 2017, 8:21 AM
sys/amd64/amd64/pmap.c
7264 ↗(On Diff #25295)

Okay. I was thinking about state during thread construction/destruction, but I see now that we wouldn't be able to ddb switch to a thread that isn't thread_link()ed anyway, so that's moot. I'll simplify it.

rlibby edited edge metadata.

kib feedback: don't be so paranoid about thread pmap linkage

This revision now requires review to proceed.Feb 17 2017, 6:11 PM
kib edited edge metadata.
kib added inline comments.
sys/amd64/amd64/pmap.c
7245 ↗(On Diff #25322)

Excessive blank line.

This revision is now accepted and ready to land.Feb 17 2017, 8:39 PM
rlibby edited edge metadata.

kib feedback: whitespace

This revision now requires review to proceed.Feb 17 2017, 9:00 PM
This revision was automatically updated to reflect the committed changes.