Write profile data if and only if requested.
authorMichael Vrable <mvrable@cs.ucsd.edu>
Tue, 30 Nov 2010 04:59:14 +0000 (20:59 -0800)
committerMichael Vrable <mvrable@cs.ucsd.edu>
Tue, 30 Nov 2010 04:59:14 +0000 (20:59 -0800)
bluesky/util.c
nfs3/rpc.c

index 45bc9f5..d854460 100644 (file)
@@ -393,7 +393,10 @@ void bluesky_profile_set_output(FILE *stream)
 
 void bluesky_profile_print(BlueSkyProfile *profile)
 {
-    FILE *stream = profiling_file ? profiling_file : stdout;
+    if (profiling_file == NULL)
+        return;
+    FILE *stream = profiling_file;
+
     g_return_if_fail(profile != NULL);
 
     g_mutex_lock(profile->lock);
index fe7d620..05d9722 100644 (file)
@@ -231,7 +231,7 @@ async_rpc_send_reply(RPCRequest *req, void *result)
 
     bluesky_profile_add_event(req->profile,
                               g_strdup("NFS reply sent"));
-    //bluesky_profile_print(req->profile);
+    bluesky_profile_print(req->profile);
 
     /* Clean up. */
     bluesky_profile_free(req->profile);