diff mbox series

[v5,10/10] linux-user: dumping hot TBs at the end of the execution

Message ID 20190815021857.19526-11-vandersonmr2@gmail.com
State New
Headers show
Series Measure Tiny Code Generation Quality | expand

Commit Message

vandersonmr Aug. 15, 2019, 2:18 a.m. UTC
dumps, in linux-user mode, the hottest TBs if -d tb_stats is used.

Signed-off-by: Vanderson M. do Rosario <vandersonmr2@gmail.com>
---
 linux-user/exit.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Aleksandar Markovic Aug. 15, 2019, 2:26 p.m. UTC | #1
15.08.2019. 04.37, "vandersonmr" <vandersonmr2@gmail.com> је написао/ла:
>
> dumps, in linux-user mode, the hottest TBs if -d tb_stats is used.
>
> Signed-off-by: Vanderson M. do Rosario <vandersonmr2@gmail.com>
> --

Hi, Vanderson,

Can you please provide an illustrative example of the dump output, within
the commit message?

Thanks,
Aleksandar

>  linux-user/exit.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/linux-user/exit.c b/linux-user/exit.c
> index bdda720553..7226104959 100644
> --- a/linux-user/exit.c
> +++ b/linux-user/exit.c
> @@ -28,6 +28,10 @@ extern void __gcov_dump(void);
>
>  void preexit_cleanup(CPUArchState *env, int code)
>  {
> +    if (tb_stats_collection_enabled()) {
> +        dump_tbs_info(max_num_hot_tbs_to_dump, SORT_BY_HOTNESS, false);
> +    }
> +
>  #ifdef TARGET_GPROF
>          _mcleanup();
>  #endif
> --
> 2.22.0
>
>
diff mbox series

Patch

diff --git a/linux-user/exit.c b/linux-user/exit.c
index bdda720553..7226104959 100644
--- a/linux-user/exit.c
+++ b/linux-user/exit.c
@@ -28,6 +28,10 @@  extern void __gcov_dump(void);
 
 void preexit_cleanup(CPUArchState *env, int code)
 {
+    if (tb_stats_collection_enabled()) {
+        dump_tbs_info(max_num_hot_tbs_to_dump, SORT_BY_HOTNESS, false);
+    }
+
 #ifdef TARGET_GPROF
         _mcleanup();
 #endif