Re: Move re test method into libvcl
On 12 Apr 2008, at 16:31, Paul Nasrat wrote: I was wanting to start looking at the vcl parser, and noticed that you can't link against just libvcl to call VCC_CompileFile due to VRT_re_test being called in vcc_string.c. Although varnishd supports -C to parse only The attached patch against trunk moves and renames the re_test method into vcc_string.c so libvcl could be used outside of varnishd. Oops - that patch didn't remove the old method definition. Here is an updated version. varnish-move-re-test.patch Description: Binary data ___ varnish-dev mailing list varnish-dev@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-dev
Re: Move re test method into libvcl
In message <[EMAIL PROTECTED]>, Paul Nasrat w rites: >> The attached patch against trunk moves and renames the re_test >> method into vcc_string.c so libvcl could be used outside of varnishd. >-int >-VRT_re_test(struct vsb *sb, const char *re, int sub) >-{ Your patch breaks the convention that compiled code only calls VRT_* functions, you need to keep a VRT_re_test() wrapper around for that reason. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 [EMAIL PROTECTED] | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. ___ varnish-dev mailing list varnish-dev@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-dev
Move re test method into libvcl
I was wanting to start looking at the vcl parser, and noticed that you can't link against just libvcl to call VCC_CompileFile due to VRT_re_test being called in vcc_string.c. Although varnishd supports -C to parse only The attached patch against trunk moves and renames the re_test method into vcc_string.c so libvcl could be used outside of varnishd. Paul varnish-move-re-test.patch Description: Binary data ___ varnish-dev mailing list varnish-dev@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-dev
Re: r2614 - trunk/varnish-cache/bin/varnishd
Hi, I mentioned to des previously that by going from trunk 2605 to 2614, my load and level of context switches per second grew a lot (during peaks), and sent a couple of graphs showing that. I've now tracked the problem down to this particular patch. I can run with the latest trunk (2629), and by removing this changeset, my load and context switches graphs are like before. Could you and/or Arjan please take look at this change again please. Running with or without -s malloc (which I've also been playing with lately) does not seem to make a difference, only applying/removing this changeset does. PS2: I recently heard des' talk on "Light My Fire". Is there any chance it could catch things like this, changes that give a distinct and negative impact on performance? Bye, Anders. On Mon, Mar 31, 2008 at 01:49:21PM +0200, [EMAIL PROTECTED] wrote: > Author: phk > Date: 2008-03-31 13:49:20 +0200 (Mon, 31 Mar 2008) > New Revision: 2614 > > Modified: >trunk/varnish-cache/bin/varnishd/cache_hash.c > Log: > Fix a memoryleak relating to hash strings, found by: Arjan (noosius). > > > > Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c > === > --- trunk/varnish-cache/bin/varnishd/cache_hash.c 2008-03-31 11:47:15 UTC > (rev 2613) > +++ trunk/varnish-cache/bin/varnishd/cache_hash.c 2008-03-31 11:49:20 UTC > (rev 2614) > @@ -383,6 +383,7 @@ > assert(VTAILQ_EMPTY(&oh->objects)); > MTX_DESTROY(&oh->mtx); > VSL_stats->n_objecthead--; > + free(oh->hash); > FREE_OBJ(oh); > } > > > ___ > varnish-commit mailing list > [EMAIL PROTECTED] > http://projects.linpro.no/mailman/listinfo/varnish-commit -- Anders. ___ varnish-dev mailing list varnish-dev@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-dev
Re: Move re test method into libvcl
On 12 Apr 2008, at 19:19, Poul-Henning Kamp wrote: > Your patch breaks the convention that compiled code only calls VRT_* > functions, you need to keep a VRT_re_test() wrapper around for that > reason. I'm not sure that's breaking that convention - the call chain is in vcc_regexp and it's a test before generating the C for the compiled vcl binary. Maybe I'm misunderstanding what you mean by "compiled code" in this case - I think that you mean that any generated C from vcl should only call VRT_* functions, which this patch doesn't change, as it's a validity check before code generation occurs. I looked on http://varnish.projects.linpro.no/wiki/DeveloperResources but didn't see a mention of this convention - is there another place I should be looking so that I can understand the coding conventions of the project? Paul ___ varnish-dev mailing list varnish-dev@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-dev