printprof() { register nltype *np; nltype **sortednlp; int index, timecmp(); int i; actime = 0.0; printf( "\f\n" ); flatprofheader(); /* * Sort the symbol table in by time */ sortednlp = (nltype **) calloc( nname , sizeof(nltype *) ); if ( sortednlp == (nltype **) 0 ) { fprintf(stderr, MSGSTR(MEMSORT, "[printprof] ran out of memory for time sorting\n")); } for ( index = 0 ; index < nname ; index += 1 ) { sortednlp[ index ] = &nl[ index ]; } qsort( sortednlp , nname , sizeof(nltype *) , timecmp ); for ( index = 0 ; index < nname ; index += 1 ) { np = sortednlp[ index ]; /* Don't print routines excluded by default, e.g. _mcount */ for(i = 0; defaultEnl[i] && np != defaultEnl[i]; i++) ; if(np == defaultEnl[i]) continue; flatprofline( np ); } actime = 0.0; cfree( sortednlp ); }
printprof() { register nltype *np; nltype **sortednlp; int index, timecmp(); actime = 0.0; printf( "\f\n" ); flatprofheader(); /* * Sort the symbol table in by time */ sortednlp = (nltype **) calloc( nname , sizeof(nltype *) ); if ( sortednlp == (nltype **) 0 ) { fprintf( stderr , "[printprof] ran out of memory for time sorting\n" ); } for ( index = 0 ; index < nname ; index += 1 ) { sortednlp[ index ] = &nl[ index ]; } qsort( sortednlp , nname , sizeof(nltype *) , timecmp ); for ( index = 0 ; index < nname ; index += 1 ) { np = sortednlp[ index ]; flatprofline( np ); } actime = 0.0; free( sortednlp ); }