Page MenuHomeFreeBSD

ddb: Add 'show active trace' command

Authored by cem on Aug 25 2016, 10:03 PM.



'show active trace', or 'acttrace' for short, prints backtraces from running
threads only.

Diff Detail

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

cem retitled this revision from to ddb: Add 'show active trace' command.
cem updated this object.
cem edited the test plan for this revision. (Show Details)
cem added reviewers: mjg, jhb.

Reduce duplication between all trace and active trace implementations.

837 ↗(On Diff #19695)

I think it would be beneficial (apart from introduction the acctrace command) to extend the default output with cpu number, if given thread is running.

Other than that looks good to me, thanks.

837 ↗(On Diff #19695)

The active_only (acttrace) output does include td_oncpu. It's the other clause of the if :-).

Or do you mean, I should add oncpu output to "all trace" as well?

837 ↗(On Diff #19695)

The latter.

837 ↗(On Diff #19695)

To be more specific, either only print CPU if the thread is running OR print CPU unconditionally along with the state, so that one can tell if it is on cpu (as opposed to having a note what last cpu it was on).

Print oncpu for running threads in both 'all trace' and 'active trace', per

cem marked an inline comment as done.Aug 26 2016, 1:46 AM

Does this look okay?

mjg edited edge metadata.

LGTM, thanks

This revision is now accepted and ready to land.Aug 26 2016, 2:33 AM
This revision was automatically updated to reflect the committed changes.