"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/pmlogrewrite/indom.c" between
pcp-6.0.2.tar.gz and pcp-6.0.3.tar.gz

About: PCP (Performance Co-Pilot) provides a framework and services to support system-level performance monitoring and management.

indom.c  (pcp-6.0.2):indom.c  (pcp-6.0.3)
skipping to change at line 212 skipping to change at line 212
int type; int type;
int sts; int sts;
hdr = (__pmLogHdr *)recbuf; hdr = (__pmLogHdr *)recbuf;
type = htonl(hdr->type); type = htonl(hdr->type);
if (type == TYPE_INDOM_DELTA) { if (type == TYPE_INDOM_DELTA) {
__pmLogInDom *idp; __pmLogInDom *idp;
lidp->indom = ntoh_pmInDom(recbuf[5]); lidp->indom = ntoh_pmInDom(recbuf[5]);
idp = pmaUndeltaInDom(inarch.ctxp->c_archctl->ac_log, recbuf); idp = pmaUndeltaInDom(inarch.ctxp->c_archctl->ac_log, recbuf);
if (idp == NULL) { if (idp == NULL) {
fprintf(stderr, "_pmUnpackInDom: Botch: undelta indom failed for indo m %s\n", pmInDomStr(lidp->indom)); fprintf(stderr, "_pmUnpackInDom: Botch: undelta InDom failed for InDo m %s\n", pmInDomStr(lidp->indom));
abandon(); abandon();
/*NOTREACHED*/ /*NOTREACHED*/
} }
lidp->stamp = idp->stamp; lidp->stamp = idp->stamp;
lidp->numinst = idp->numinst; lidp->numinst = idp->numinst;
lidp->instlist = idp->instlist; lidp->instlist = idp->instlist;
lidp->namelist = idp->namelist; lidp->namelist = idp->namelist;
/* don't free lidp->namelist or lidp->namelist[i] or lidp->instlist */ /* don't free lidp->namelist or lidp->namelist[i] or lidp->instlist */
lidp->alloc = 0; lidp->alloc = 0;
} }
skipping to change at line 267 skipping to change at line 267
do_indom(int type) do_indom(int type)
{ {
long out_offset; long out_offset;
indomspec_t *ip; indomspec_t *ip;
int sts; int sts;
int i; int i;
int j; int j;
int pdu_type; int pdu_type;
__pmLogInDom lid; __pmLogInDom lid;
__pmLogInDom *dup_lid; __pmLogInDom *dup_lid;
__pmHashNode *hp;
lid.numinst = 0; lid.numinst = 0;
lid.alloc = 0; lid.alloc = 0;
out_offset = __pmFtell(outarch.logctl.mdfp); out_offset = __pmFtell(outarch.logctl.mdfp);
_pmUnpackInDom(inarch.metarec, &lid); _pmUnpackInDom(inarch.metarec, &lid);
/* /*
* Only safe approach from here one is to duplicate lid * Only safe approach from here one is to duplicate lid
* so that all elements, particularly namelist and each * so that all elements, particularly namelist and each
skipping to change at line 290 skipping to change at line 291
fprintf(stderr, "%s: Error: __pmDupLogInDom: %s: NULL\n", fprintf(stderr, "%s: Error: __pmDupLogInDom: %s: NULL\n",
pmGetProgname(), pmInDomStr(lid.indom)); pmGetProgname(), pmInDomStr(lid.indom));
abandon(); abandon();
/*NOTREACHED*/ /*NOTREACHED*/
} }
__pmFreeLogInDom(&lid); __pmFreeLogInDom(&lid);
lid = *dup_lid; /* struct assignment */ lid = *dup_lid; /* struct assignment */
lid.alloc &= ~PMLID_SELF; /* don't free lid */ lid.alloc &= ~PMLID_SELF; /* don't free lid */
free(dup_lid); free(dup_lid);
if (lid.indom != PM_INDOM_NULL) {
/*
* if indom's refcount is zero, no need to emit it
*/
if ((hp = __pmHashSearch((unsigned int)lid.indom, &indom_hash)) == NULL)
{
fprintf(stderr, "Botch: InDom: %s: not in indom_hash table\n", pmInDo
mStr(lid.indom));
}
else {
int *refp;
refp = (int *)hp->data;
if (*refp == 0) {
if (pmDebugOptions.appl1) {
fprintf(stderr, "Delete: InDom: %s: no output metrics use thi
s\n",
pmInDomStr(lid.indom));
}
goto done;
}
}
}
/* /*
* global time stamp adjustment (if any has already been done in the * global time stamp adjustment (if any has already been done in the
* record buffer, so this is reflected in the unpacked value of stamp. * record buffer, so this is reflected in the unpacked value of stamp.
*/ */
for (ip = indom_root; ip != NULL; ip = ip->i_next) { for (ip = indom_root; ip != NULL; ip = ip->i_next) {
if (ip->old_indom != lid.indom) if (ip->old_indom != lid.indom)
continue; continue;
if (ip->indom_flags & INDOM_DUPLICATE) { if (ip->indom_flags & INDOM_DUPLICATE) {
/* /*
* Save the old indom without changes, then operate on the * Save the old indom without changes, then operate on the
skipping to change at line 451 skipping to change at line 472
if (pmDebugOptions.appl0) { if (pmDebugOptions.appl0) {
fprintf(stderr, "Metadata: write "); fprintf(stderr, "Metadata: write ");
if (pdu_type == TYPE_INDOM_DELTA) if (pdu_type == TYPE_INDOM_DELTA)
fprintf(stderr, "Delta "); fprintf(stderr, "Delta ");
else if (pdu_type == TYPE_INDOM_V2) else if (pdu_type == TYPE_INDOM_V2)
fprintf(stderr, "V2 "); fprintf(stderr, "V2 ");
fprintf(stderr, "InDom %s @ offset=%ld\n", pmInDomStr(lid.indom), out _offset); fprintf(stderr, "InDom %s @ offset=%ld\n", pmInDomStr(lid.indom), out _offset);
} }
} }
done:
__pmFreeLogInDom(&lid); __pmFreeLogInDom(&lid);
} }
 End of changes. 4 change blocks. 
1 lines changed or deleted 26 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)