[patch 1 of 3] 3.2 test - categorize profiling

David Disseldorp ddiss at sgi.com
Sat Apr 19 09:59:37 GMT 2008


Anyone had a chance to look at this patch series?

Cheers, Dave



On Fri, 28 Mar 2008 13:50:59 +1100
David Disseldorp <ddiss at sgi.com> wrote:

> Hi,
> 
> Currently in Samba 3, profiling statistics (syscalls, smbs, etc.) can be
> enabled or disabled for count or time metrics only.
> 
> This change makes profiling more granular by allowing the user to enable
> or disable stats collection on a per category/action basis.
> 
> In addition to previously supported <profilinglevel> arguments to smbd
> and smbcontrol, a string in the format category:action can now be
> provided for <profilinglevel>.
> 
> Where category is one of:
>         "all"
>         "General"
>         "System Calls"
>         "Stat Cache"
>         "Write Cache"
>         "SMB"
>         "Pathworks"
>         "Trans2"
>         "NT Transact"
>         "ACL"
>         "NetBIOS"
> 
> and action is one of:
>         "all"
>         "count"
>         "bytes"
>         "time"
> 
> e.g. # smbd -P "SMB:count,System Calls:all" will start smbd with
> counters incremented for each incoming SMB, as well as count, time
> and byte counters for system calls. 
> 
> 
> 
> Patches against v3-2-test (in apply order)
> ------------------------------------------
> remove-do-profile-add (*Attached*)
>   - remove the unused DO_PROFILE_ADD() macro from smbprofile.h
>   - patch by Alison Winters
> 
> remove-flush-reasons-array (*Attached*)
>   - don't store writecache_flushed_writes stats in a separate array.
>   - patch by Alison Winters
> 
> categorize_profiling
>   - allow profiling to be enabled on a per category/action basis
>   - store all profiling counters in an array
>   - use enums as indexes to stats storage and name/category mapping
>   - concept based on a patch by Alison Winters
> 
> do_not_use_printf_star
>  - categorize_profiling uses the '*' field width specifier with
>    printf. Apparently Solaris libc does not support this.
> 
> cat_prof_man_page_update
>   - explain how to use category:action profile level argument


More information about the samba-technical mailing list