Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/util-linux/readprofile.c

    r2725 r3232  
    3232 * Paul Mundt <lethal@linux-sh.org>.
    3333 */
     34
     35//usage:#define readprofile_trivial_usage
     36//usage:       "[OPTIONS]"
     37//usage:#define readprofile_full_usage "\n\n"
     38//usage:       "    -m mapfile  (Default: /boot/System.map)"
     39//usage:     "\n    -p profile  (Default: /proc/profile)"
     40//usage:     "\n    -M NUM      Set the profiling multiplier to NUM"
     41//usage:     "\n    -i      Print only info about the sampling step"
     42//usage:     "\n    -v      Verbose"
     43//usage:     "\n    -a      Print all symbols, even if count is 0"
     44//usage:     "\n    -b      Print individual histogram-bin counts"
     45//usage:     "\n    -s      Print individual counters within functions"
     46//usage:     "\n    -r      Reset all the counters (root only)"
     47//usage:     "\n    -n      Disable byte order auto-detection"
    3448
    3549#include "libbb.h"
     
    150164        if (sscanf(mapline, "%llx %s %s", &fn_add, mode, fn_name) != 3)
    151165            bb_error_msg_and_die("%s(%i): wrong map line",
    152                          mapFile, maplineno);
     166                    mapFile, maplineno);
    153167
    154168        if (!strcmp(fn_name, "_stext")) /* only elf works like this */ {
     
    185199        if (indx >= len / sizeof(*buf))
    186200            bb_error_msg_and_die("profile address out of range. "
    187                          "Wrong map file?");
     201                    "Wrong map file?");
    188202
    189203        while (indx < (next_add-add0)/step) {
     
    207221            if (optVerbose)
    208222                printf("%016llx %-40s %6i %8.4f\n", fn_add,
    209                        fn_name, this, this/(double)fn_len);
     223                    fn_name, this, this/(double)fn_len);
    210224            else
    211225                printf("%6i %-40s %8.4f\n",
    212                        this, fn_name, this/(double)fn_len);
     226                    this, fn_name, this/(double)fn_len);
    213227            if (optSub) {
    214228                unsigned long long scan;
     
    220234                    addr = (scan - 1)*step + add0;
    221235                    printf("\t%#llx\t%s+%#llx\t%u\n",
    222                            addr, fn_name, addr - fn_add,
    223                            buf[scan]);
     236                        addr, fn_name, addr - fn_add,
     237                        buf[scan]);
    224238                }
    225239            }
     
    238252    if (optVerbose)
    239253        printf("%016x %-40s %6i %8.4f\n",
    240                0, "total", total, total/(double)(fn_add-add0));
     254            0, "total", total, total/(double)(fn_add-add0));
    241255    else
    242256        printf("%6i %-40s %8.4f\n",
    243                total, "total", total/(double)(fn_add-add0));
     257            total, "total", total/(double)(fn_add-add0));
    244258
    245259    fclose(map);
Note: See TracChangeset for help on using the changeset viewer.