Page MenuHomeFreeBSD

Check dtrace invop earlier, shotcut if it is dtrace fbt exception.
ClosedPublic

Authored by howard0su_gmail.com on Nov 24 2015, 1:06 PM.
Tags
None
Referenced Files
F105977357: D4266.id10518.diff
Mon, Dec 23, 9:17 AM
Unknown Object (File)
Fri, Dec 13, 8:22 PM
Unknown Object (File)
Mon, Dec 9, 7:16 PM
Unknown Object (File)
Thu, Dec 5, 6:36 AM
Unknown Object (File)
Wed, Dec 4, 3:01 AM
Unknown Object (File)
Tue, Dec 3, 10:50 PM
Unknown Object (File)
Tue, Dec 3, 8:50 PM
Unknown Object (File)
Mon, Dec 2, 11:15 PM
Subscribers

Details

Summary

Check invop of dtrace inside exception.S to reduce overhead to
call into C code. also check this earlier also reduce unnecessary
overhead.

Diff Detail

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

Event Timeline

howard0su_gmail.com retitled this revision from to Check dtrace invop earlier, shotcut if it is dtrace fbt exception..
howard0su_gmail.com updated this object.
howard0su_gmail.com edited the test plan for this revision. (Show Details)

You will also need to adjust the number of frames to skip in DTrace when running a stack trace as there is not one fewer.

sys/arm/arm/exception.S
374 ↗(On Diff #10468)

This should use PSR_USR32_MODE

378–385 ↗(On Diff #10468)

In l41BSD we moved this to the C handler

388 ↗(On Diff #10468)

Move FBT_PATCHVAL from sys/cddl/dev/fbt/arm/fbt_isa.c to trap.h and use this here. You should also rename it to something like FBT_BREAKPOINT. We need to be able to tell the difference between DTrace and DDB breakpoint instructions.

howard0su_gmail.com edited edge metadata.

Check dtrace invop earlier, shotcut if it is dtrace fbt exception.

it can enable fbt under VERSATILEPB. But still has issue when I try to sysctl kern.kdb.enter=1, i hit kernel stack overflow.

sys/arm/arm/exception.S
378–385 ↗(On Diff #10468)

we have to do here since I want to check the INSN in assembly.

Check dtrace invop earlier, shotcut if it is dtrace fbt exception.

sys/arm/arm/exception.S
397 ↗(On Diff #10477)

This is only needed in the non-KDTRACE_HOOKS case.

sys/arm/include/trap.h
10 ↗(On Diff #10477)

It should be named FBT_BREAKPOINT, and there is no need for the comment.

Fix 5th parameter add Dtrace support to trap-v6 code.

andrew edited edge metadata.

Unless someone has any objections I'm planning on committing this tomorrow.

This revision is now accepted and ready to land.Nov 30 2015, 11:44 PM
howard0su_gmail.com edited edge metadata.

Rename FBT_PATCHVAL to FBT_BREAKPOINT

This revision now requires review to proceed.Dec 1 2015, 12:39 AM
howard0su_gmail.com edited edge metadata.

Rename FBT_PATCHVAL to FBT_BREAKPOINT

This revision was automatically updated to reflect the committed changes.