diff mbox

[1/3] monitor: remove unused do_info_trace

Message ID 1336067796-5730-2-git-send-email-harsh@linux.vnet.ibm.com
State New
Headers show

Commit Message

Harsh Prateek Bora May 3, 2012, 5:56 p.m. UTC
Going forward with simpletrace v2 variable size trace records, we cannot
have a generic function to print trace event info and therefore this
interface becomes invalid.

As per Stefan Hajnoczi:

"This command is only available from the human monitor.  It's not very
useful because it historically hasn't been able to pretty-print events
or show them in the right order (we use a ringbuffer but it prints
them out from index 0).

Therefore, I don't think we're under any obligation to keep this
command around.  No one has complained about it's limitations - I
think this is a sign that no one has used it.  I'd be okay with a
patch that removes it."

Ref: http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg01268.html

Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com>
---
 monitor.c |   16 ----------------
 1 files changed, 0 insertions(+), 16 deletions(-)

Comments

Lluís Vilanova May 7, 2012, 1:46 p.m. UTC | #1
Harsh Prateek Bora writes:

> Going forward with simpletrace v2 variable size trace records, we cannot
> have a generic function to print trace event info and therefore this
> interface becomes invalid.

> As per Stefan Hajnoczi:

> "This command is only available from the human monitor.  It's not very
> useful because it historically hasn't been able to pretty-print events
> or show them in the right order (we use a ringbuffer but it prints
> them out from index 0).

> Therefore, I don't think we're under any obligation to keep this
> command around.  No one has complained about it's limitations - I
> think this is a sign that no one has used it.  I'd be okay with a
> patch that removes it."

> Ref: http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg01268.html

Eliminating 'do_info_trace' makes 'st_print_trace' unused; so maybe it could
also be eliminated.


Lluis


> Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com>
> ---
>  monitor.c |   16 ----------------
>  1 files changed, 0 insertions(+), 16 deletions(-)

> diff --git a/monitor.c b/monitor.c
> index 8946a10..bebf864 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -812,13 +812,6 @@ static void do_info_cpu_stats(Monitor *mon)
>  }
>  #endif
 
> -#if defined(CONFIG_TRACE_SIMPLE)
> -static void do_info_trace(Monitor *mon)
> -{
> -    st_print_trace((FILE *)mon, &monitor_fprintf);
> -}
> -#endif
> -
>  static void do_trace_print_events(Monitor *mon)
>  {
>      trace_print_events((FILE *)mon, &monitor_fprintf);
> @@ -2585,15 +2578,6 @@ static mon_cmd_t info_cmds[] = {
>          .help       = "show roms",
>          .mhandler.info = do_info_roms,
>      },
> -#if defined(CONFIG_TRACE_SIMPLE)
> -    {
> -        .name       = "trace",
> -        .args_type  = "",
> -        .params     = "",
> -        .help       = "show current contents of trace buffer",
> -        .mhandler.info = do_info_trace,
> -    },
> -#endif
>      {
>          .name       = "trace-events",
>          .args_type  = "",
> -- 
> 1.7.1.1
Harsh Prateek Bora May 8, 2012, 5:11 a.m. UTC | #2
On 05/07/2012 07:16 PM, Lluís Vilanova wrote:
> Harsh Prateek Bora writes:
>
>> Going forward with simpletrace v2 variable size trace records, we cannot
>> have a generic function to print trace event info and therefore this
>> interface becomes invalid.
>
>> As per Stefan Hajnoczi:
>
>> "This command is only available from the human monitor.  It's not very
>> useful because it historically hasn't been able to pretty-print events
>> or show them in the right order (we use a ringbuffer but it prints
>> them out from index 0).
>
>> Therefore, I don't think we're under any obligation to keep this
>> command around.  No one has complained about it's limitations - I
>> think this is a sign that no one has used it.  I'd be okay with a
>> patch that removes it."
>
>> Ref: http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg01268.html
>
> Eliminating 'do_info_trace' makes 'st_print_trace' unused; so maybe it could
> also be eliminated.
>

Yeah, though that gets removed in 2/3 patch, it makes sense to remove 
that here.

- Harsh

>
> Lluis
>
>
>> Signed-off-by: Harsh Prateek Bora<harsh@linux.vnet.ibm.com>
>> ---
>>   monitor.c |   16 ----------------
>>   1 files changed, 0 insertions(+), 16 deletions(-)
>
>> diff --git a/monitor.c b/monitor.c
>> index 8946a10..bebf864 100644
>> --- a/monitor.c
>> +++ b/monitor.c
>> @@ -812,13 +812,6 @@ static void do_info_cpu_stats(Monitor *mon)
>>   }
>>   #endif
>
>> -#if defined(CONFIG_TRACE_SIMPLE)
>> -static void do_info_trace(Monitor *mon)
>> -{
>> -    st_print_trace((FILE *)mon,&monitor_fprintf);
>> -}
>> -#endif
>> -
>>   static void do_trace_print_events(Monitor *mon)
>>   {
>>       trace_print_events((FILE *)mon,&monitor_fprintf);
>> @@ -2585,15 +2578,6 @@ static mon_cmd_t info_cmds[] = {
>>           .help       = "show roms",
>>           .mhandler.info = do_info_roms,
>>       },
>> -#if defined(CONFIG_TRACE_SIMPLE)
>> -    {
>> -        .name       = "trace",
>> -        .args_type  = "",
>> -        .params     = "",
>> -        .help       = "show current contents of trace buffer",
>> -        .mhandler.info = do_info_trace,
>> -    },
>> -#endif
>>       {
>>           .name       = "trace-events",
>>           .args_type  = "",
>> --
>> 1.7.1.1
>
>
>
diff mbox

Patch

diff --git a/monitor.c b/monitor.c
index 8946a10..bebf864 100644
--- a/monitor.c
+++ b/monitor.c
@@ -812,13 +812,6 @@  static void do_info_cpu_stats(Monitor *mon)
 }
 #endif
 
-#if defined(CONFIG_TRACE_SIMPLE)
-static void do_info_trace(Monitor *mon)
-{
-    st_print_trace((FILE *)mon, &monitor_fprintf);
-}
-#endif
-
 static void do_trace_print_events(Monitor *mon)
 {
     trace_print_events((FILE *)mon, &monitor_fprintf);
@@ -2585,15 +2578,6 @@  static mon_cmd_t info_cmds[] = {
         .help       = "show roms",
         .mhandler.info = do_info_roms,
     },
-#if defined(CONFIG_TRACE_SIMPLE)
-    {
-        .name       = "trace",
-        .args_type  = "",
-        .params     = "",
-        .help       = "show current contents of trace buffer",
-        .mhandler.info = do_info_trace,
-    },
-#endif
     {
         .name       = "trace-events",
         .args_type  = "",