qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v14 04/10] accel/tcg: add jit stats and time to TBStatistics


From: Richard Henderson
Subject: Re: [PATCH v14 04/10] accel/tcg: add jit stats and time to TBStatistics
Date: Thu, 1 Jun 2023 07:10:22 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

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

[Prev in Thread] Current Thread [Next in Thread]