On 5/31/23 23:48, Wu, Fei wrote:
-int64_t tcg_cpu_exec_time(void);
+uint64_t tcg_cpu_exec_time(void);

Why?  (Also, probably wants removing, per above.)

The original patch mentioned 'make it an uint64_t as we won't be dealing
in negative numbers.'

The signed vs unsigned thing is something that should be handled throughout everything that handles times, not adjusted here and there by only profiling.

--- a/softmmu/runstate.c
+++ b/softmmu/runstate.c
@@ -728,9 +728,18 @@ static bool main_loop_should_exit(int *status)
   int qemu_main_loop(void)
   {
       int status = EXIT_SUCCESS;
+#ifdef CONFIG_TCG
+    uint64_t ti;
+#endif
         while (!main_loop_should_exit(&status)) {
+#ifdef CONFIG_TCG
+        ti = profile_getclock();
+#endif
           main_loop_wait(false);
+#ifdef CONFIG_TCG
+        dev_time += profile_getclock() - ti;
+#endif
       }

What is this intending to collect?  Because I don't think it measures
anything.  Certainly nothing related to TCG, CPUs or even devices.

It's exported to hmp cmd in dump_jit_exec_time_info() together with
cpu_exec_time.

That doesn't answer my question: What do you think it measures?

r~

Reply via email to