sendfile profiling patch for utils/status.c

Pierre Belanger pbelang1 at oss.cantel.rogers.com
Thu Oct 3 14:05:00 GMT 2002


Hello all,

I'm including a "tiny patch" for utils/status.c , in
diff -u format ... Hope I did this right!

After applying the patch...

  # ./bin/smbstatus -P
  {snip}
  read_bytes:                     0
  write_count:                    1
  write_time:                     166
  write_bytes:                    54
  sendfile_count:                 4
  sendfile_time:                  16262
  sendfile_bytes:                 20480
  lseek_count:                    2
  lseek_time:                     18
  rename_count:                   0
  {snip}

The patch is attached in the mail. Fell free to all the
required "printf" where I add them, after the write_bytes,
or anywhere else...

Thank you,
Pierre B.
-------------- next part --------------
--- utils/status.c	Mon Aug 26 12:08:01 2002
+++ utils/status.c.new	Thu Oct  3 09:50:19 2002
@@ -194,6 +194,11 @@
 	printf("write_count:                    %u\n", profile_p->syscall_write_count);
 	printf("write_time:                     %u\n", profile_p->syscall_write_time);
 	printf("write_bytes:                    %u\n", profile_p->syscall_write_bytes);
+#ifdef HAVE_SENDFILE
+	printf("sendfile_count:                    %u\n", profile_p->syscall_sendfile_count);
+	printf("sendfile_time:                     %u\n", profile_p->syscall_sendfile_time);
+	printf("sendfile_bytes:                    %u\n", profile_p->syscall_sendfile_bytes);
+#endif
 	printf("lseek_count:                    %u\n", profile_p->syscall_lseek_count);
 	printf("lseek_time:                     %u\n", profile_p->syscall_lseek_time);
 	printf("rename_count:                   %u\n", profile_p->syscall_rename_count);


More information about the samba-technical mailing list