Page MenuHomeFreeBSD

fusefs: convert debug printfs into dtrace probes
ClosedPublic

Authored by asomers on Mar 21 2019, 12:37 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 19 2024, 3:33 PM
Unknown Object (File)
Mar 19 2024, 3:32 PM
Unknown Object (File)
Mar 19 2024, 3:01 PM
Unknown Object (File)
Mar 19 2024, 2:56 PM
Unknown Object (File)
Jan 17 2024, 8:25 AM
Unknown Object (File)
Jan 16 2024, 3:45 AM
Unknown Object (File)
Dec 25 2023, 11:30 AM
Unknown Object (File)
Dec 20 2023, 5:48 AM
Subscribers

Details

Summary

fusefs: convert debug printfs into dtrace probes

fuse(4) was heavily instrumented with debug printf statements that could
only be enabled with compile-time flags. They fell into three basic groups:

  1. Totally redundant with dtrace FBT probes. These I deleted.
  2. Print textual information, usually error messages. These I converted to SDT probes of the form fuse:fuse:FILE:trace. They work just like the old printf statements except they can be enabled at runtime with dtrace. They can be filtered by FILE and/or by priority.
  3. More complicated probes that print detailed information. These I converted into ad-hoc SDT probes.

Also, de-inline fuse_internal_cache_attrs.
It's big enough to be a regular function, and this way it gets a dtrace FBT
probe.

This commit is a merge of r345304, r344914, r344703, and r344664 from
projects/fuse2.

Test Plan

extensively tested already on the fuse2 branch

Diff Detail

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

Event Timeline

I like the idea of converting the compile time debug prints into Dtrace SBT probes. But I’m not sure what the cache attribute function change has to do with these other logical changes.

In D19667#421605, @cem wrote:

I like the idea of converting the compile time debug prints into Dtrace SBT probes. But I’m not sure what the cache attribute function change has to do with these other logical changes.

You mean the de-inlineing of cache_attrs? I did that so it would get a dtrace fbt probe. I was pretty sure that I would want a probe in that position, and this seems easier and better than adding an SDT probe.

You mean the de-inlineing of cache_attrs? I did that so it would get a dtrace fbt probe. I was pretty sure that I would want a probe in that position, and this seems easier and better than adding an SDT probe.

Yeah. I guess that makes sense. Would it be reasonable to inline the fast path check (don’t cache && null outparam pointer)?

In D19667#421689, @cem wrote:

You mean the de-inlineing of cache_attrs? I did that so it would get a dtrace fbt probe. I was pretty sure that I would want a probe in that position, and this seems easier and better than adding an SDT probe.

Yeah. I guess that makes sense. Would it be reasonable to inline the fast path check (don’t cache && null outparam pointer)?

On reflection, I think I'd rather not. I would have to inline almost half of the function.

Are you ok with this diff as-is, @cem?

This revision is now accepted and ready to land.Mar 28 2019, 11:00 PM
This revision was automatically updated to reflect the committed changes.