Show source index in VCL_trace

Guillaume Quintard guillaume at varnish-software.com
Mon Aug 28 10:33:29 CEST 2017


Aaaaaaaaactually, I was more saying that we would be open to a PR :-)

the "appending to not break stuff" may not play here, with 6.0 and all
(specially since it's a rarely used interface)

Let's wait for the bugwash.

-- 
Guillaume Quintard

On Mon, Aug 28, 2017 at 10:23 AM, kokoniimasu <kokoniimasu at gmail.com> wrote:

> Hi, Guillaume
>
> Thank you for yur replay
>
> > We sort of already discussed that a few months ago and sort of agreed on
> the first proposition (adding an vcl file index). I wanted to have a tool
> actually using it before pushing any changes and that got put on the
> backburner...
>
> Good news.
> I'll wait VSL format change!
>
>
> 2017-08-28 16:31 GMT+09:00 Guillaume Quintard <guillaume at varnish-software.
> com>:
> > Hi,
> >
> > We sort of already discussed that a few months ago and sort of agreed on
> the
> > first proposition (adding an vcl file index). I wanted to have a tool
> > actually using it before pushing any changes and that got put on the
> > backburner...
> >
> > The VSL isn't painful, it's just a printf :-) I can help if you need a
> hand.
> >
> > --
> > Guillaume Quintard
> >
> > On Mon, Aug 28, 2017 at 7:47 AM, kokoniimasu <kokoniimasu at gmail.com>
> wrote:
> >>
> >> Hello,
> >>
> >> I'm using VCL_trace for debugging.
> >> But, VCL_trace is not enough little info, if using multipe VCLs.
> >>
> >>
> >>   24025048 VCL_trace      c 3 14.5
> >>   24025048 VCL_trace      c 4 18.9
> >>                             |  |  |
> >>                             |  |  +- VCL program line position
> >>                             |  +---- VCL program line number
> >>                             +------- VCL trace point index
> >>
> >>
> >> VCL_trace does not have identify source file way in VSL.
> >> To identify, need to run varnishd "varnishd -C -f [file]"
> >>
> >>
> >>   $varnishd -C -f /etc/varnish/default.vcl 2>&1 |less
> >>   ...
> >>   static struct vrt_ref VGC_ref[VGC_NREFS] = {
> >>     [  1] = { 2,     1670,   66,   3,  "new" },
> >>     [  2] = { 0,      143,    7,   3,  "new" },
> >>     [  3] = { 0,      289,   14,   5,  "if" },
> >>     [  4] = { 0,      392,   18,   9,  "set" },
> >>   ...
> >>
> >>
> >> This way have a problem, because it can't be guaranteed same as a
> >> running config.
> >>
> >> I thought 2 pattern solution.
> >>
> >> - Add vcl source index in vcl_trace.
> >>
> >> https://github.com/varnishcache/varnish-cache/
> compare/master...xcir:patch/modify_vcl_trace?expand=1
> >>
> >>    32770 VCL_trace      c 1 2.3.3
> >>    32770 VCL_trace      c 2 2.4.5
> >>                           | | | |
> >>                           | | | +---- VCL program line position
> >>                           | | +------ VCL program line number
> >>                           | +-------- VCL program source index
> >>                           +---------- VCL trace point index
> >>
> >>
> >>
> >> - Add -t(trace) option in vcl.show
> >>
> >> https://github.com/varnishcache/varnish-cache/
> compare/master...xcir:patch/add_t_opt_cli?expand=1
> >> This patch dumps VGC_ref.
> >>
> >>    $ sudo varnishadm vcl.show -t boot
> >>    index src  line  pos token
> >>        1   2     3    3 "if"
> >>        2   2     4    5 "std.log"
> >>    ...
> >>       36   1   189    5 "return"
> >>       37   1   193    5 "return"
> >>
> >> I think modify to vcl_trace is better.
> >> But, VSL format change is painful.
> >>
> >> I'll like to create either pull-request.
> >> Can I get your opinion?
> >>
> >> Regards,
> >> --
> >> Shohei Tanaka(@xcir)
> >> http://blog.xcir.net/ (JP)
> >>
> >> _______________________________________________
> >> varnish-misc mailing list
> >> varnish-misc at varnish-cache.org
> >> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20170828/51573892/attachment.html>


More information about the varnish-misc mailing list