Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Marc-André Lureau
Hi - Original Message - > Hi > > - Original Message - > > > If I was reading the code of a project and noticed that they checked a > > > global variable every time before calling g_debug(), I would find that > > > very odd. For example: > > > > > > void foo(void) > > > { > > >

Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Marc-André Lureau
Hi - Original Message - > > If I was reading the code of a project and noticed that they checked a > > global variable every time before calling g_debug(), I would find that > > very odd. For example: > > > > void foo(void) > > { > > if (foo_get_debug()) { > > g_debug("somethin

Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Victor Toso
Hi, On Fri, Jun 09, 2017 at 01:00:56PM -0500, Jonathon Jongsma wrote: > On Fri, 2017-06-09 at 12:41 -0400, Marc-André Lureau wrote: > > Hi > > > > - Original Message - > > > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > > > unnecessary since g_log() will already check w

Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Marc-André Lureau
Hi - Original Message - > On Fri, 2017-06-09 at 12:41 -0400, Marc-André Lureau wrote: > > Hi > > > > - Original Message - > > > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > > > unnecessary since g_log() will already check whether the message > > > will > > > ac

Re: [Spice-devel] RFC: Lightweight tracing mechanism

2017-06-09 Thread Jonathon Jongsma
On Fri, 2017-06-09 at 12:11 -0400, Marc-André Lureau wrote: > > > > - Original Message - > > > > > On 9 Jun 2017, at 17:16, Jonathon Jongsma > > > wrote: > > > > > > On Fri, 2017-06-09 at 10:59 +0200, Christophe de Dinechin wrote: > > > > > > What I see on the thread: > > > > > > - log

Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Jonathon Jongsma
On Fri, 2017-06-09 at 12:41 -0400, Marc-André Lureau wrote: > Hi > > - Original Message - > > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > > unnecessary since g_log() will already check whether the message > > will > > actually be printed. The only benefit to calling th

Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Frediano Ziglio
> > Hi > > - Original Message - > > > > > > Hi > > > > > > - Original Message - > > > > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > > > > unnecessary since g_log() will already check whether the message will > > > > actually be printed. The only benefit to c

Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Marc-André Lureau
Hi - Original Message - > > > > Hi > > > > - Original Message - > > > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > > > unnecessary since g_log() will already check whether the message will > > > actually be printed. The only benefit to calling this function fr

Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Frediano Ziglio
> > Hi > > - Original Message - > > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > > unnecessary since g_log() will already check whether the message will > > actually be printed. The only benefit to calling this function from > > SPICE_DEBUG() is that it ensures that th

Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Marc-André Lureau
Hi - Original Message - > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > unnecessary since g_log() will already check whether the message will > actually be printed. The only benefit to calling this function from > SPICE_DEBUG() is that it ensures that the SPICE_DEBUG env

Re: [Spice-devel] [PATCH spice-gtk] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Frediano Ziglio
> > On 9 Jun 2017, at 17:47, Frediano Ziglio < fzig...@redhat.com > wrote: > > > > On Fri, 2017-06-09 at 05:47 -0400, Frediano Ziglio wrote: > > > > > > > > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > > > > > > > > > > > > > > > unnecessary since g_log() will already c

Re: [Spice-devel] RFC: Lightweight tracing mechanism

2017-06-09 Thread Marc-André Lureau
- Original Message - > > > On 9 Jun 2017, at 17:16, Jonathon Jongsma wrote: > > > > On Fri, 2017-06-09 at 10:59 +0200, Christophe de Dinechin wrote: > What I see on the thread: > - log categorization. This was similar to Djasa bug but I think > he just > proposed

Re: [Spice-devel] [PATCH spice-gtk] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Christophe de Dinechin
> On 9 Jun 2017, at 17:47, Frediano Ziglio wrote: > >> >> On Fri, 2017-06-09 at 05:47 -0400, Frediano Ziglio wrote: Calling spice_util_get_debug() from the SPICE_DEBUG() macro is unnecessary since g_log() will already check whether the message will actually be printed.

Re: [Spice-devel] RFC: Lightweight tracing mechanism

2017-06-09 Thread Marc-André Lureau
- Original Message - > [drop_stats]id=0 #in-frames=99 #late=99 (100.00%, avg 2995.89 ms) > #drop-on-playback=0 (0.00%) > [drop_stats]id=0 #in-frames=198 #late=198 (100.00%, avg 2160.48 ms) > #drop-on-playback=3 (1.52%) > [drop_stats]id=0 #in-frames=297 #late=297 (100.00%, avg 1881.11 ms)

[Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Jonathon Jongsma
Calling spice_util_get_debug() from the SPICE_DEBUG() macro is unnecessary since g_log() will already check whether the message will actually be printed. The only benefit to calling this function from SPICE_DEBUG() is that it ensures that the SPICE_DEBUG environment variable gets read the very firs

Re: [Spice-devel] [PATCH spice-gtk v3 1/6] display-gst: check codec type before creating decoder

2017-06-09 Thread Frediano Ziglio
> > > > On 8 Jun 2017, at 16:47, Christophe Fergeau wrote: > > > > On Thu, Jun 08, 2017 at 10:39:53AM -0400, Frediano Ziglio wrote: > >>> > >>> On Thu, Jun 08, 2017 at 03:55:11PM +0200, Victor Toso wrote: > > > > Not really worth all that discussion, your patch is ok :) > >

Re: [Spice-devel] [PATCH spice-gtk v3 1/6] display-gst: check codec type before creating decoder

2017-06-09 Thread Victor Toso
Hi, On Fri, Jun 09, 2017 at 05:44:28PM +0200, Christophe de Dinechin wrote: > > > On 8 Jun 2017, at 16:39, Frediano Ziglio wrote: > > > >> > >> On Thu, Jun 08, 2017 at 03:55:11PM +0200, Victor Toso wrote: > > Not really worth all that discussion, your patch is ok :) > >>> > >>> Ah,

Re: [Spice-devel] [PATCH spice-gtk] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Frediano Ziglio
> > On Fri, 2017-06-09 at 05:47 -0400, Frediano Ziglio wrote: > > > > > > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > > > unnecessary since g_log() will already check whether the message > > > will > > > actually be printed. The only benefit to calling this function from > >

Re: [Spice-devel] [PATCH spice-gtk v3 1/6] display-gst: check codec type before creating decoder

2017-06-09 Thread Victor Toso
Hi, On Fri, Jun 09, 2017 at 05:36:30PM +0200, Christophe de Dinechin wrote: > > > On 8 Jun 2017, at 16:47, Christophe Fergeau wrote: > > > > On Thu, Jun 08, 2017 at 10:39:53AM -0400, Frediano Ziglio wrote: > >>> > >>> On Thu, Jun 08, 2017 at 03:55:11PM +0200, Victor Toso wrote: > > >

Re: [Spice-devel] [PATCH spice-gtk v3 1/6] display-gst: check codec type before creating decoder

2017-06-09 Thread Christophe de Dinechin
> On 8 Jun 2017, at 16:39, Frediano Ziglio wrote: > >> >> On Thu, Jun 08, 2017 at 03:55:11PM +0200, Victor Toso wrote: Not really worth all that discussion, your patch is ok :) >>> >>> Ah, I liked the discusison mostly because this would be a spice <-> >>> spice-gtk communication bu

Re: [Spice-devel] RFC: Lightweight tracing mechanism

2017-06-09 Thread Christophe de Dinechin
> On 9 Jun 2017, at 17:16, Jonathon Jongsma wrote: > > On Fri, 2017-06-09 at 10:59 +0200, Christophe de Dinechin wrote: What I see on the thread: - log categorization. This was similar to Djasa bug but I think he just proposed to use domains in the glib log sense; >> >> Pu

Re: [Spice-devel] [PATCH spice-gtk v3 1/6] display-gst: check codec type before creating decoder

2017-06-09 Thread Christophe de Dinechin
> On 8 Jun 2017, at 16:47, Christophe Fergeau wrote: > > On Thu, Jun 08, 2017 at 10:39:53AM -0400, Frediano Ziglio wrote: >>> >>> On Thu, Jun 08, 2017 at 03:55:11PM +0200, Victor Toso wrote: > > Not really worth all that discussion, your patch is ok :) Ah, I liked the discus

Re: [Spice-devel] RFC: Lightweight tracing mechanism

2017-06-09 Thread Christophe de Dinechin
> On 9 Jun 2017, at 11:48, Marc-André Lureau > wrote: > > Hi > > I'll focus on your examples, as I think it's the most relevant for the > discussion (let's avoid side-track). > > - Original Message - > >>> spicy -t drop_stats=100 -h turbo -p 5901 >> [drop_stats]id=0 #in-frames=100 #

Re: [Spice-devel] RFC: Lightweight tracing mechanism

2017-06-09 Thread Jonathon Jongsma
On Fri, 2017-06-09 at 10:59 +0200, Christophe de Dinechin wrote: > > > What I see on the thread: > > > - log categorization. This was similar to Djasa bug but I think > > > he just > > >   proposed to use domains in the glib log sense; > > Punchcard analogy: “Printer sheet categorization. This was

Re: [Spice-devel] [PATCH spice-gtk v2] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Frediano Ziglio
> > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > unnecessary since g_log() will already check whether the message will > actually be printed. The only benefit to calling this function from > SPICE_DEBUG() is that it ensures that the SPICE_DEBUG environment > variable gets read

[Spice-devel] [PATCH spice-gtk v2] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Jonathon Jongsma
Calling spice_util_get_debug() from the SPICE_DEBUG() macro is unnecessary since g_log() will already check whether the message will actually be printed. The only benefit to calling this function from SPICE_DEBUG() is that it ensures that the SPICE_DEBUG environment variable gets read the very firs

Re: [Spice-devel] [PATCH spice-gtk] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Jonathon Jongsma
On Fri, 2017-06-09 at 05:47 -0400, Frediano Ziglio wrote: > > > > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > > unnecessary since g_log() will already check whether the message > > will > > actually be printed. The only benefit to calling this function from > > SPICE_DEBUG() i

Re: [Spice-devel] [PATCH spice-gtk v3 1/6] display-gst: check codec type before creating decoder

2017-06-09 Thread Frediano Ziglio
> > Hi, > > On Thu, Jun 08, 2017 at 10:39:53AM -0400, Frediano Ziglio wrote: > > > > > > On Thu, Jun 08, 2017 at 03:55:11PM +0200, Victor Toso wrote: > > > > > > > > > > Not really worth all that discussion, your patch is ok :) > > > > > > > > Ah, I liked the discusison mostly because this wou

Re: [Spice-devel] [PATCH spice-gtk v3 1/6] display-gst: check codec type before creating decoder

2017-06-09 Thread Victor Toso
Hi, On Thu, Jun 08, 2017 at 10:39:53AM -0400, Frediano Ziglio wrote: > > > > On Thu, Jun 08, 2017 at 03:55:11PM +0200, Victor Toso wrote: > > > > > > > > Not really worth all that discussion, your patch is ok :) > > > > > > Ah, I liked the discusison mostly because this would be a spice <-> > >

Re: [Spice-devel] RFC: Lightweight tracing mechanism

2017-06-09 Thread Frediano Ziglio
> > Hi > > I'll focus on your examples, as I think it's the most relevant for the > discussion (let's avoid side-track). > > - Original Message - > > > > spicy -t drop_stats=100 -h turbo -p 5901 > > [drop_stats]id=0 #in-frames=100 #late=100 (100.00%, avg 1639.24 ms) > > #drop-on-playbac

Re: [Spice-devel] RFC: Lightweight tracing mechanism

2017-06-09 Thread Victor Toso
Hi, On Fri, Jun 09, 2017 at 11:25:15AM +0200, Christophe de Dinechin wrote: > Some interesting stuff in there. Victor, do you have a repository / > branch where I could fetch that (even if it’s stale)? https://cgit.freedesktop.org/~victortoso/spice-common/log/?h=logs It was far from what I inten

Re: [Spice-devel] RFC: Lightweight tracing mechanism

2017-06-09 Thread Marc-André Lureau
Hi I'll focus on your examples, as I think it's the most relevant for the discussion (let's avoid side-track). - Original Message - > > spicy -t drop_stats=100 -h turbo -p 5901 > [drop_stats]id=0 #in-frames=100 #late=100 (100.00%, avg 1639.24 ms) > #drop-on-playback=8 (8.00%) > [drop_st

Re: [Spice-devel] [PATCH spice-gtk] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Frediano Ziglio
> > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > unnecessary since g_log() will already check whether the message will > actually be printed. The only benefit to calling this function from > SPICE_DEBUG() is that it ensures that the SPICE_DEBUG environment > variable gets read

Re: [Spice-devel] [PATCH spice-gtk] Remove unnecessary debug check from SPICE_DEBUG

2017-06-09 Thread Christophe de Dinechin
> > On 8 Jun 2017, at 23:17, Jonathon Jongsma wrote: > > Calling spice_util_get_debug() from the SPICE_DEBUG() macro is > unnecessary since g_log() will already check whether the message will > actually be printed. The only benefit to calling this function from > SPICE_DEBUG() is that it ensures

Re: [Spice-devel] RFC: Lightweight tracing mechanism

2017-06-09 Thread Christophe de Dinechin
Some interesting stuff in there. Victor, do you have a repository / branch where I could fetch that (even if it’s stale)? Thanks Christophe > On 7 Jun 2017, at 17:39, Christophe Fergeau wrote: > > On Wed, Jun 07, 2017 at 11:30:24AM -0400, Marc-André Lureau wrote: >> Or it's not performance-sen

Re: [Spice-devel] RFC: Lightweight tracing mechanism

2017-06-09 Thread Christophe de Dinechin
This is a response to Christophe, Marc André and Frediano, but it starts with a top-post for context. My intent should become clearer with actual examples. You can test the code and examples from the same location as before: https://github.com/c3d/spice-gtk/compare/master...c3d:traces and http