Bläddra i källkod

A little more minor formatting

Ian Goldberg 11 månader sedan
förälder
incheckning
8cd0015726
1 ändrade filer med 13 tillägg och 6 borttagningar
  1. 13 6
      Enclave/route.cpp

+ 13 - 6
Enclave/route.cpp

@@ -1009,25 +1009,32 @@ static void round1b_processing(void *cbpointer) {
         unsigned long start_round1b =
             printf_with_rtclock("begin round1b processing (%u)\n", inserted);
         // Sort the messages we've received
-        unsigned long start_sort =
-            printf_with_rtclock("begin oblivious sort (%u,%u)\n", inserted,
-                route_state.max_round1a_msgs);
 #endif
         // Sort received messages by increasing user ID and
         // priority. Larger priority number indicates higher priority.
         if (inserted > 0) {
             // copy items in sorted order into round1a_sorted
+#ifdef PROFILE_ROUTING
+        unsigned long start_sort =
+            printf_with_rtclock("begin oblivious sort (%u,%u)\n", inserted,
+                route_state.max_round1a_msgs);
+#endif
             sort_mtobliv<UidPriorityKey>(g_teems_config.nthreads, round1a.buf,
-                g_teems_config.msg_size, round1a.inserted, route_state.max_round1a_msgs,
+                g_teems_config.msg_size, round1a.inserted,
+                route_state.max_round1a_msgs,
                 route_state.round1a_sorted.buf);
+#ifdef PROFILE_ROUTING
+        printf_with_rtclock_diff(start_sort, "end oblivious sort (%u,%u)\n",
+            inserted, route_state.max_round1a_msgs);
+#endif
             send_round1b_msgs(round1a_sorted.buf, round1a.inserted);
         } else {
             send_round1b_msgs(NULL, 0);
         }
 
 #ifdef PROFILE_ROUTING
-        printf_with_rtclock_diff(start_sort, "end oblivious sort (%u,%u)\n", inserted, route_state.max_round1a_msgs);
-        printf_with_rtclock_diff(start_round1b, "end round1b processing (%u)\n", inserted);
+        printf_with_rtclock_diff(start_round1b, "end round1b processing (%u)\n",
+            inserted);
 #endif
 
         pthread_mutex_unlock(&round1a_sorted.mutex);