Re: What's cooking in git.git (May 2017, #08; Mon, 29)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 29, 2017 at 8:23 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> * ab/pcre-v2 (2017-05-26) 7 commits
>  - grep: add support for PCRE v2
>  - grep: un-break building with PCRE < 8.20
>  - grep: un-break building with PCRE < 8.32
>  - grep: add support for the PCRE v1 JIT API
>  - log: add -P as a synonym for --perl-regexp
>  - grep: skip pthreads overhead when using one thread
>  - grep: don't redundantly compile throwaway patterns under threading
>  (this branch uses ab/grep-preparatory-cleanup.)
>
>  Update "perl-compatible regular expression" support to enable JIT
>  and also allow linking with the newer PCRE v2 library.
>
>  Will merge to 'next'.

First a general question: When you say "will merge" in these E-Mails,
that means "before the next what's cooking in ~7 days, right? I.e. if
there's no issues in a given series does the pu->next->master cycle
take 3wks?

Anyway, the PCRE v1 set of JIT patches break builds on PCRE compiled
with --disable-jit, which is apparently Johannes's Windows
configuration.

This on top fixes it:

diff --git a/grep.h b/grep.h
index 246f6695c1..6cb21a3544 100644
--- a/grep.h
+++ b/grep.h
@@ -3,7 +3,7 @@
 #include "color.h"
 #ifdef USE_LIBPCRE1
 #include <pcre.h>
-#ifdef PCRE_CONFIG_JIT
+#ifdef SLJIT_CONFIG_AUTO
 #if PCRE_MAJOR >= 8 && PCRE_MINOR >= 32
 #define GIT_PCRE1_USE_JIT
 #endif

But I'm waiting on the pcre-dev list to answer my "is this use of an
internal macro really the least insane way to check for this, because
there seems to be no other way?" question:
https://lists.exim.org/lurker/message/20170531.184405.9d7b128f.en.html

I'm also going to fix this up:

diff --git a/grep.c b/grep.c
index e4c1ead104..d0bf37858a 100644
--- a/grep.c
+++ b/grep.c
@@ -502,9 +502,7 @@ static void compile_pcre2_pattern(struct grep_pat
*p, const struct grep_opt *opt
        pcre2_config(PCRE2_CONFIG_JIT, &p->pcre2_jit_on);
        if (p->pcre2_jit_on == 1) {
                jitret = pcre2_jit_compile(p->pcre2_pattern,
PCRE2_JIT_COMPLETE);
-               if (!jitret)
-                       p->pcre2_jit_on = 1;
-               else
+               if (jitret)
                        die("Couldn't JIT the PCRE2 pattern '%s', got
'%d'\n", p->pattern, jitret);
                p->pcre2_jit_stack = pcre2_jit_stack_create(1, 1024 *
1024, NULL);
                if (!p->pcre2_jit_stack)


And a perf test in a commit message that makes no sense since I split
up the PCRE v1 patch.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]