Page MenuHomeFreeBSD

Make pmcstat provide a better warning message to users when samples are dropped
AbandonedPublic

Authored by jtl on Nov 10 2015, 7:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 26, 5:09 AM
Unknown Object (File)
Wed, Jun 26, 4:04 AM
Unknown Object (File)
Tue, Jun 25, 8:21 PM
Unknown Object (File)
Thu, Jun 20, 3:33 AM
Unknown Object (File)
Sat, Jun 15, 10:15 AM
Unknown Object (File)
Mon, Jun 3, 4:21 AM
Unknown Object (File)
Feb 17 2024, 10:46 AM
Unknown Object (File)
Dec 19 2023, 10:06 PM
Subscribers

Details

Reviewers
sjg
jhb
gnn
bz
Summary

Change the driver stats to what they really are: unsigned values.

When pmcstat exits after some samples were dropped, give the user an
idea of how many were lost. (Granted, these are global numbers, but
they may still help quantify the scope of the loss.)

Sponsored by: Juniper Networks
Approved by: gnn (mentor) [Assuming he does... ;-)]
MFC after: 1 month

Test Plan

'make buildkernel' and 'make buildworld' succeeded.

Ran with a very low sampling frequency to create drops, and saw the new
error message.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1135
Build 1139: arc lint + arc unit

Event Timeline

jtl retitled this revision from to Make pmcstat provide a better warning message to users when samples are dropped.
jtl updated this object.
jtl edited the test plan for this revision. (Show Details)
jtl added reviewers: sjg, gnn, jhb, bz.

Other than the code nit listed above this is ready to go into the tree. Once the formatting is fixed please commit with:

Approved by: gnn (mentor)

lib/libpmc/pmc.h
49

Does this really split a line? We don't want to do that if we can avoid it.

gnn edited edge metadata.
This revision is now accepted and ready to land.Nov 12 2015, 2:27 AM

Are you worried about overflow at all? Should the messages say something like "sampling was paused at least %u times" to indicate that the problem could be much worse than indicated?

In D4123#86858, @jhb wrote:

Are you worried about overflow at all? Should the messages say something like "sampling was paused at least %u times" to indicate that the problem could be much worse than indicated?

Seems reasonable. I'll make the change.

jtl edited edge metadata.

Minor change to warning message suggested by @jhb.

This adds "at least" to the warning message to account for counter overflows.

This revision now requires review to proceed.Nov 14 2015, 1:21 AM
jtl marked an inline comment as done.Nov 14 2015, 1:22 AM
jtl added inline comments.
lib/libpmc/pmc.h
49

Per our email conversation, I'll leave the formatting as it was in the patch in order to maintain the comment alignment between lines.

jtl marked 2 inline comments as done.Nov 14 2015, 1:22 AM