diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/depends.c | 8 | ||||
-rw-r--r-- | lib/psm.c | 11 | ||||
-rw-r--r-- | lib/rpmts.c | 2 | ||||
-rw-r--r-- | lib/rpmts.h | 6 | ||||
-rw-r--r-- | lib/transaction.c | 16 |
5 files changed, 23 insertions, 20 deletions
diff --git a/lib/depends.c b/lib/depends.c index 856759916..bfe02be50 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -1179,7 +1179,7 @@ int rpmtsOrder(rpmts ts) rpmalMakeIndex(ts->addedPackages); #endif - (void) rpmswNow(&ts->begin); + (void) rpmswEnter(&ts->op, -1); /* T1. Initialize. */ if (oType == 0) @@ -1582,7 +1582,7 @@ assert(newOrderCount == ts->orderCount); #endif freeBadDeps(); - ts->ms_order += rpmswDiff(rpmswNow(&ts->end), &ts->begin)/1000; + ts->ms_order += rpmswExit(&ts->op, -1)/1000; return 0; } @@ -1597,7 +1597,7 @@ int rpmtsCheck(rpmts ts) int xx; int rc; - (void) rpmswNow(&ts->begin); + (void) rpmswEnter(&ts->op, -1); /* Do lazy, readonly, open of rpm database. */ if (rpmtsGetRdb(ts) == NULL && ts->dbmode != -1) { @@ -1724,7 +1724,7 @@ exit: mi = rpmdbFreeIterator(mi); pi = rpmtsiFree(pi); - ts->ms_check += rpmswDiff(rpmswNow(&ts->end), &ts->begin)/1000; + ts->ms_check += rpmswExit(&ts->op, -1)/1000; /*@-branchstate@*/ if (closeatexit) @@ -470,13 +470,18 @@ static pid_t psmWait(rpmpsm psm) /*@globals fileSystem, internalState @*/ /*@modifies psm, fileSystem, internalState @*/ { + const rpmts ts = psm->ts; + rpmtime_t msecs; + (void) rpmsqWait(&psm->sq); + msecs = psm->sq.op.usecs/1000; + ts->ms_scriptlets += msecs; - rpmMessage(RPMMESS_DEBUG, _("%s: waitpid(%d) rc %d status %x secs %u.%03u\n"), + rpmMessage(RPMMESS_DEBUG, + _("%s: waitpid(%d) rc %d status %x secs %u.%03u\n"), psm->stepName, (unsigned)psm->sq.child, (unsigned)psm->sq.reaped, psm->sq.status, - (unsigned)psm->sq.msecs/1000, - (unsigned)psm->sq.msecs%1000); + (unsigned)msecs/1000, (unsigned)msecs%1000); return psm->sq.reaped; } diff --git a/lib/rpmts.c b/lib/rpmts.c index 070a62c3d..13710a5c2 100644 --- a/lib/rpmts.c +++ b/lib/rpmts.c @@ -1270,8 +1270,6 @@ rpmts rpmtsCreate(void) memset(ts->pksignid, 0, sizeof(ts->pksignid)); ts->dig = NULL; - (void) rpmswNow(&ts->create); - ts->nrefs = 0; return rpmtsLink(ts, "tsCreate"); diff --git a/lib/rpmts.h b/lib/rpmts.h index 26b98333e..9e7ab76d3 100644 --- a/lib/rpmts.h +++ b/lib/rpmts.h @@ -194,15 +194,15 @@ struct rpmts_s { size_t pkpktlen; /*!< Current pubkey packet length. */ unsigned char pksignid[8]; /*!< Current pubkey fingerprint. */ - struct rpmsw_s create; /*!< Creation time stamp. */ - struct rpmsw_s begin; /*!< Begin operation time stamp. */ - struct rpmsw_s end; /*!< End operation time stamp. */ + struct rpmop_s op; /*!< Transaction operation time stamp. */ + rpmtime_t ms_check; rpmtime_t ms_order; rpmtime_t ms_fingerprint; rpmtime_t ms_repackage; rpmtime_t ms_install; rpmtime_t ms_erase; + rpmtime_t ms_scriptlets; /*@null@*/ pgpDig dig; /*!< Current signature/pubkey parameters. */ diff --git a/lib/transaction.c b/lib/transaction.c index 41ceba2f5..fc2b6ac7b 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -1154,7 +1154,7 @@ rpmMessage(RPMMESS_DEBUG, _("sanity checking %d elements\n"), rpmtsNElements(ts) */ rpmMessage(RPMMESS_DEBUG, _("computing %d file fingerprints\n"), totalFileCount); -(void) rpmswNow(&ts->begin); + (void) rpmswEnter(&ts->op, -1); numAdded = numRemoved = 0; pi = rpmtsiInit(ts); @@ -1367,7 +1367,7 @@ rpmMessage(RPMMESS_DEBUG, _("computing file dispositions\n")); NOTIFY(ts, (NULL, RPMCALLBACK_TRANS_STOP, 6, ts->orderCount, NULL, ts->notifyData)); -ts->ms_fingerprint += rpmswDiff(rpmswNow(&ts->end), &ts->begin)/1000; + ts->ms_fingerprint += rpmswExit(&ts->op, -1)/1000; /* =============================================== * Free unused memory as soon as possible. @@ -1424,7 +1424,7 @@ ts->ms_fingerprint += rpmswDiff(rpmswNow(&ts->end), &ts->begin)/1000; numRemoved, NULL, ts->notifyData)); progress++; -(void) rpmswNow(&ts->begin); + (void) rpmswEnter(&ts->op, -1); /* XXX TR_REMOVED needs CPIO_MAP_{ABSOLUTE,ADDDOT} CPIO_ALL_HARDLINKS */ fi->mapflags |= CPIO_MAP_ABSOLUTE; @@ -1437,7 +1437,7 @@ ts->ms_fingerprint += rpmswDiff(rpmswNow(&ts->end), &ts->begin)/1000; fi->mapflags &= ~CPIO_MAP_ADDDOT; fi->mapflags &= ~CPIO_ALL_HARDLINKS; -ts->ms_repackage += rpmswDiff(rpmswNow(&ts->end), &ts->begin)/1000; + ts->ms_repackage += rpmswExit(&ts->op, -1)/1000; /*@switchbreak@*/ break; } @@ -1472,7 +1472,7 @@ assert(psm != NULL); switch (rpmteType(p)) { case TR_ADDED: -(void) rpmswNow(&ts->begin); + (void) rpmswEnter(&ts->op, -1); pkgKey = rpmteAddedKey(p); @@ -1569,12 +1569,12 @@ assert(psm != NULL); p->h = headerFree(p->h); -ts->ms_install += rpmswDiff(rpmswNow(&ts->end), &ts->begin)/1000; + ts->ms_install += rpmswExit(&ts->op, -1)/1000; /*@switchbreak@*/ break; case TR_REMOVED: -(void) rpmswNow(&ts->begin); + (void) rpmswEnter(&ts->op, -1); rpmMessage(RPMMESS_DEBUG, "========== --- %s\n", rpmteNEVR(p)); /* @@ -1586,7 +1586,7 @@ ts->ms_install += rpmswDiff(rpmswNow(&ts->end), &ts->begin)/1000; ourrc++; } -ts->ms_erase += rpmswDiff(rpmswNow(&ts->end), &ts->begin)/1000; + ts->ms_erase += rpmswExit(&ts->op, -1)/1000; /*@switchbreak@*/ break; } |