[patch 1 of 3] 3.2 test - categorize profiling

David Disseldorp ddiss at sgi.com
Fri Mar 28 02:50:59 GMT 2008


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove-do-profile-add
Type: application/octet-stream
Size: 732 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20080328/00ab3884/remove-do-profile-add.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove-flush-reasons-array
Type: application/octet-stream
Size: 6088 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20080328/00ab3884/remove-flush-reasons-array.obj


More information about the samba-technical mailing list