RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  [EMAIL PROTECTED]
  Module: rpm                              Date:   18-May-2008 04:19:04
  Branch: HEAD                             Handle: 2008051802190300

  Modified files:
    rpm                     CHANGES
    rpm/lib                 poptALL.c
    rpm/rpmdb               header.c librpmdb.vers

  Log:
    - jbj: add enabler options to chase down headerLoad() hot-spots.

  Summary:
    Revision    Changes     Path
    1.2350      +1  -0      rpm/CHANGES
    2.91        +8  -0      rpm/lib/poptALL.c
    1.161       +5  -5      rpm/rpmdb/header.c
    1.46        +2  -2      rpm/rpmdb/librpmdb.vers
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.2349 -r1.2350 CHANGES
  --- rpm/CHANGES       18 May 2008 02:03:12 -0000      1.2349
  +++ rpm/CHANGES       18 May 2008 02:19:03 -0000      1.2350
  @@ -1,5 +1,6 @@
   
   5.1.0 -> 5.2a0:
  +    - jbj: add enabler options to chase down headerLoad() hot-spots.
       - jbj: add a missing newline to a debug message.
       - jbj: revert rpmtsOpenDB on --checksig path, rely on the lazy open
        in rpmtsFindPubkey instead.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/poptALL.c
  ============================================================================
  $ cvs diff -u -r2.90 -r2.91 poptALL.c
  --- rpm/lib/poptALL.c 2 Apr 2008 21:56:47 -0000       2.90
  +++ rpm/lib/poptALL.c 18 May 2008 02:19:03 -0000      2.91
  @@ -44,6 +44,10 @@
   
   /[EMAIL PROTECTED]@*/
   extern int _hdr_debug;
  +/[EMAIL PROTECTED]@*/
  +extern int _hdr_fastdatalength;
  +/[EMAIL PROTECTED]@*/
  +extern int _hdr_lazytagswab;
   
   /[EMAIL PROTECTED]@*/
   extern int _pkgio_debug;
  @@ -368,6 +372,10 @@
        N_("use threads for file state machine"), NULL},
    { "hdrdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_hdr_debug, -1,
        NULL, NULL},
  + { "hdrfastdatalength", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, 
&_hdr_fastdatalength, -1,
  +     NULL, NULL},
  + { "hdrlazytagswab", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, 
&_hdr_lazytagswab, -1,
  +     NULL, NULL},
    { "macrosused", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmts_macros, 
-1,
        NULL, NULL},
    { "pkgiodebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_pkgio_debug, 
-1,
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/header.c
  ============================================================================
  $ cvs diff -u -r1.160 -r1.161 header.c
  --- rpm/rpmdb/header.c        12 May 2008 18:17:56 -0000      1.160
  +++ rpm/rpmdb/header.c        18 May 2008 02:19:03 -0000      1.161
  @@ -28,10 +28,10 @@
   /[EMAIL PROTECTED] indexEntry @*/
   
   /* Compute tag data store size using offsets? */
  -static int _fastdatalength = 0;
  +int _hdr_fastdatalength = 0;
   
   /* Swab tag data only when accessed through headerGet()? */
  -static int _lazytagswab = 0;
  +int _hdr_lazytagswab = 0;
   
   /** \ingroup header
    */
  @@ -446,7 +446,7 @@
       /* Allocate all returned storage (if not already). */
       if (he->p.ptr && nb && !he->freeData) {
        void * ptr = xmalloc(nb);
  -     if (_lazytagswab) {
  +     if (_hdr_lazytagswab) {
            if (tagSwab(ptr, he, nb) != NULL)
                he->p.ptr = ptr;
            else {
  @@ -535,7 +535,7 @@
        pend.ui8p = (uint8_t *) dataEnd;
   
        /* Find the length of the tag data store. */
  -     if (dataEnd && _fastdatalength) {
  +     if (dataEnd && _hdr_fastdatalength) {
            /* Compute the tag data store length using offsets. */
            if (il > 1)
                ie.length = ((uint32_t) ntohl(pe[1].offset) - ie.info.offset);
  @@ -586,7 +586,7 @@
        }
   
        /* Perform endian conversions */
  -     if (_lazytagswab)
  +     if (_hdr_lazytagswab)
            t += ie.length;
        else {
            he->tag = ie.info.tag;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/librpmdb.vers
  ============================================================================
  $ cvs diff -u -r1.45 -r1.46 librpmdb.vers
  --- rpm/rpmdb/librpmdb.vers   12 May 2008 18:17:56 -0000      1.45
  +++ rpm/rpmdb/librpmdb.vers   18 May 2008 02:19:03 -0000      1.46
  @@ -2,8 +2,6 @@
   {
     global:
       _rpmdb_debug;
  -    _rsegfault;
  -    _wsegfault;
       db3dbi;
       db3Free;
       db3New;
  @@ -23,7 +21,9 @@
       fpLookup;
       fpLookupList;
       _hdr_debug;
  +    _hdr_fastdatalength;
       _hdr_getops;
  +    _hdr_lazytagswab;
       _hdr_loadops;
       _hdr_stats;
       headerAddI18NString;
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                [email protected]

Reply via email to