• Sihyeon Jang's avatar
    perf beauty mmap_flags: Fixed syntax error Fixed missing ']' error · 00879763
    Sihyeon Jang authored
    Committer testing:
    
    Before:
    
      # tools/perf/trace/beauty/mmap_flags.sh
      static const char *mmap_flags[] = {
    	[ilog2(0x40) + 1] = "32BIT",
      tools/perf/trace/beauty/mmap_flags.sh: line 23: [: missing `]'
    	[ilog2(0x01) + 1] = "SHARED",
    	[ilog2(0x02) + 1] = "PRIVATE",
    	[ilog2(0x10) + 1] = "FIXED",
    	[ilog2(0x20) + 1] = "ANONYMOUS",
    	[ilog2(0x100000) + 1] = "FIXED_NOREPLACE",
      tools/perf/trace/beauty/mmap_flags.sh: line 28: [: missing `]'
    	[ilog2(0x0100) + 1] = "GROWSDOWN",
    	[ilog2(0x0800) + 1] = "DENYWRITE",
    	[ilog2(0x1000) + 1] = "EXECUTABLE",
    	[ilog2(0x2000) + 1] = "LOCKED",
    	[ilog2(0x4000) + 1] = "NORESERVE",
    	[ilog2(0x8000) + 1] = "POPULATE",
    	[ilog2(0x10000) + 1] = "NONBLOCK",
    	[ilog2(0x20000) + 1] = "STACK",
    	[ilog2(0x40000) + 1] = "HUGETLB",
    	[ilog2(0x80000) + 1] = "SYNC",
      };
      #
    
    After:
    
      $ tools/perf/trace/beauty/mmap_flags.sh
      static const char *mmap_flags[] = {
    	[ilog2(0x40) + 1] = "32BIT",
    	[ilog2(0x01) + 1] = "SHARED",
    	[ilog2(0x02) + 1] = "PRIVATE",
    	[ilog2(0x10) + 1] = "FIXED",
    	[ilog2(0x20) + 1] = "ANONYMOUS",
    	[ilog2(0x100000) + 1] = "FIXED_NOREPLACE",
    	[ilog2(0x0100) + 1] = "GROWSDOWN",
    	[ilog2(0x0800) + 1] = "DENYWRITE",
    	[ilog2(0x1000) + 1] = "EXECUTABLE",
    	[ilog2(0x2000) + 1] = "LOCKED",
    	[ilog2(0x4000) + 1] = "NORESERVE",
    	[ilog2(0x8000) + 1] = "POPULATE",
    	[ilog2(0x10000) + 1] = "NONBLOCK",
    	[ilog2(0x20000) + 1] = "STACK",
    	[ilog2(0x40000) + 1] = "HUGETLB",
    	[ilog2(0x80000) + 1] = "SYNC",
      };
      $
    Signed-off-by: default avatarSihyeon Jang <uneedsihyeon@gmail.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Fixes: aca70cc40a0b ("perf beauty mmap_flags: Check if the arch has a mmap.h file")
    Link: http://lkml.kernel.org/r/20181202080651.4685-1-uneedsihyeon@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    00879763
mmap_flags.sh 1.21 KB