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 <[email protected]>: > 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 <[email protected]> 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 >> [email protected] >> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > > _______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
