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
F105769916: D9645.diff
Fri, Dec 20, 11:02 AM
Unknown Object (File)
Mon, Nov 25, 8:04 PM
Unknown Object (File)
Sat, Nov 23, 11:55 PM
Unknown Object (File)
Nov 13 2024, 4:00 PM
Unknown Object (File)
Oct 25 2024, 2:48 AM
Unknown Object (File)
Oct 15 2024, 4:22 AM
Unknown Object (File)
Sep 21 2024, 8:33 AM
Unknown Object (File)
Sep 18 2024, 9:38 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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 7523
Build 7681: arc lint + arc unit

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

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

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

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.