@@ -292,15 +292,15 @@ main(int argc, char *argv[])
292
292
if ( !getrawtstat (ifd , tstatp , rr .pcomplen , rr .ndeviat ) )
293
293
exit (7 );
294
294
295
- // get compressed cgroup-level statistics
295
+ // read compressed cgroup-level statistics (no need to decompress)
296
296
//
297
297
cstatp = malloc (rr .ccomplen );
298
298
299
- ptrverify (cstatp , "Malloc failed for compressed pidlist \n" );
299
+ ptrverify (cstatp , "Malloc failed for compressed cgroup stats \n" );
300
300
301
301
readin (ifd , cstatp , rr .ccomplen );
302
302
303
- // get compressed pidlist
303
+ // read compressed pidlist (no need to decompress)
304
304
//
305
305
istatp = malloc (rr .icomplen );
306
306
@@ -640,37 +640,6 @@ getrawtstat(int rawfd, struct tstat *pp, int complen, int ndeviat)
640
640
}
641
641
642
642
643
- #if 0
644
- // Function to read the cgroup-level statistics
645
- // from the current offset
646
- //
647
- static struct cstat *
648
- getrawcstat (int rawfd , unsigned long ccomplen , unsigned long coriglen )
649
- {
650
- Byte * ccompbuf , * corigbuf ;
651
- int rv ;
652
-
653
- /*
654
- ** read all cstat structs
655
- */
656
- ccompbuf = malloc (ccomplen );
657
- corigbuf = malloc (coriglen );
658
-
659
- ptrverify (ccompbuf , "Malloc failed for reading compressed cgroups\n" );
660
- ptrverify (corigbuf , "Malloc failed for decompressing cgroups\n" );
661
-
662
- readin (rawfd , ccompbuf , ccomplen );
663
-
664
- rv = uncompress ((Byte * )corigbuf , & coriglen , ccompbuf , ccomplen );
665
-
666
- testcompval (rv , "uncompress cgroups" );
667
-
668
- free (ccompbuf );
669
-
670
- return (struct cstat * )corigbuf ;
671
- }
672
- #endif
673
-
674
643
// Function to write a new output sample from the current offset
675
644
//
676
645
static void
0 commit comments