Skip to content
Snippets Groups Projects
Select Git revision
  • af04dd2f8ebaa8fbd46f698714acbf43da14da45
  • linus-master default
  • kunit_is_love
  • kunit_drm
  • tonyk/futex_waitv
  • hidraw_rwlock
  • futex_waitv
  • futex2-dev
  • idle_sleep
  • futex2-proton
  • futex-tests
  • futex2
  • futex2-numa
  • fwm-5.11
  • cf-fix
  • tmpfs-ic
  • futex2-stable-5.11
  • futex2-stable
  • futex2-lpc
  • gaming
  • futex-fixes
21 results

dwarf-aux.c

Blame
    • Masami Hiramatsu's avatar
      af04dd2f
      perf probe: Fix to show ranges of variables in functions without entry_pc · af04dd2f
      Masami Hiramatsu authored
      
      Fix to show ranges of variables (--range and --vars option) in functions
      which DIE has only ranges but no entry_pc attribute.
      
      Without this fix:
      
        # perf probe --range -V clear_tasks_mm_cpumask
        Available variables at clear_tasks_mm_cpumask
        	@<clear_tasks_mm_cpumask+0>
        		(No matched variables)
      
      With this fix:
      
        # perf probe --range -V clear_tasks_mm_cpumask
        Available variables at clear_tasks_mm_cpumask
      	@<clear_tasks_mm_cpumask+0>
      		[VAL]	int	cpu	@<clear_tasks_mm_cpumask+[0-35,317-317,2052-2059]>
      
      Committer testing:
      
      Before:
      
        [root@quaco ~]# perf probe --range -V clear_tasks_mm_cpumask
        Available variables at clear_tasks_mm_cpumask
                @<clear_tasks_mm_cpumask+0>
                        (No matched variables)
        [root@quaco ~]#
      
      After:
      
        [root@quaco ~]# perf probe --range -V clear_tasks_mm_cpumask
        Available variables at clear_tasks_mm_cpumask
                @<clear_tasks_mm_cpumask+0>
                        [VAL]   int     cpu     @<clear_tasks_mm_cpumask+[0-23,23-105,105-106,106-106,1843-1850,1850-1862]>
        [root@quaco ~]#
      
      Using it:
      
        [root@quaco ~]# perf probe clear_tasks_mm_cpumask cpu
        Added new event:
          probe:clear_tasks_mm_cpumask (on clear_tasks_mm_cpumask with cpu)
      
        You can now use it in all perf tools, such as:
      
        	perf record -e probe:clear_tasks_mm_cpumask -aR sleep 1
      
        [root@quaco ~]# perf probe -l
          probe:clear_tasks_mm_cpumask (on clear_tasks_mm_cpumask@kernel/cpu.c with cpu)
        [root@quaco ~]#
        [root@quaco ~]# perf trace -e probe:*cpumask
        ^C[root@quaco ~]#
      
      Fixes: 349e8d26 ("perf probe: Add --range option to show a variable's location range")
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lore.kernel.org/lkml/157199323018.8075.8179744380479673672.stgit@devnote2
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      af04dd2f
      History
      perf probe: Fix to show ranges of variables in functions without entry_pc
      Masami Hiramatsu authored
      
      Fix to show ranges of variables (--range and --vars option) in functions
      which DIE has only ranges but no entry_pc attribute.
      
      Without this fix:
      
        # perf probe --range -V clear_tasks_mm_cpumask
        Available variables at clear_tasks_mm_cpumask
        	@<clear_tasks_mm_cpumask+0>
        		(No matched variables)
      
      With this fix:
      
        # perf probe --range -V clear_tasks_mm_cpumask
        Available variables at clear_tasks_mm_cpumask
      	@<clear_tasks_mm_cpumask+0>
      		[VAL]	int	cpu	@<clear_tasks_mm_cpumask+[0-35,317-317,2052-2059]>
      
      Committer testing:
      
      Before:
      
        [root@quaco ~]# perf probe --range -V clear_tasks_mm_cpumask
        Available variables at clear_tasks_mm_cpumask
                @<clear_tasks_mm_cpumask+0>
                        (No matched variables)
        [root@quaco ~]#
      
      After:
      
        [root@quaco ~]# perf probe --range -V clear_tasks_mm_cpumask
        Available variables at clear_tasks_mm_cpumask
                @<clear_tasks_mm_cpumask+0>
                        [VAL]   int     cpu     @<clear_tasks_mm_cpumask+[0-23,23-105,105-106,106-106,1843-1850,1850-1862]>
        [root@quaco ~]#
      
      Using it:
      
        [root@quaco ~]# perf probe clear_tasks_mm_cpumask cpu
        Added new event:
          probe:clear_tasks_mm_cpumask (on clear_tasks_mm_cpumask with cpu)
      
        You can now use it in all perf tools, such as:
      
        	perf record -e probe:clear_tasks_mm_cpumask -aR sleep 1
      
        [root@quaco ~]# perf probe -l
          probe:clear_tasks_mm_cpumask (on clear_tasks_mm_cpumask@kernel/cpu.c with cpu)
        [root@quaco ~]#
        [root@quaco ~]# perf trace -e probe:*cpumask
        ^C[root@quaco ~]#
      
      Fixes: 349e8d26 ("perf probe: Add --range option to show a variable's location range")
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lore.kernel.org/lkml/157199323018.8075.8179744380479673672.stgit@devnote2
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    head32.c 1.74 KiB
    /*
     *  linux/arch/i386/kernel/head32.c -- prepare to run common code
     *
     *  Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE
     *  Copyright (C) 2007 Eric Biederman <ebiederm@xmission.com>
     */
    
    #include <linux/init.h>
    #include <linux/start_kernel.h>
    #include <linux/mm.h>
    #include <linux/memblock.h>
    
    #include <asm/setup.h>
    #include <asm/sections.h>
    #include <asm/e820.h>
    #include <asm/page.h>
    #include <asm/apic.h>
    #include <asm/io_apic.h>
    #include <asm/bios_ebda.h>
    #include <asm/tlbflush.h>
    
    static void __init i386_default_early_setup(void)
    {
    	/* Initialize 32bit specific setup functions */
    	x86_init.resources.reserve_resources = i386_reserve_resources;
    	x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc;
    
    	reserve_ebda_region();
    }
    
    void __init i386_start_kernel(void)
    {
    	memblock_reserve(__pa_symbol(&_text),
    			 __pa_symbol(&__bss_stop) - __pa_symbol(&_text));
    
    #ifdef CONFIG_BLK_DEV_INITRD
    	/* Reserve INITRD */
    	if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) {
    		/* Assume only end is not page aligned */
    		u64 ramdisk_image = boot_params.hdr.ramdisk_image;
    		u64 ramdisk_size  = boot_params.hdr.ramdisk_size;
    		u64 ramdisk_end   = PAGE_ALIGN(ramdisk_image + ramdisk_size);
    		memblock_reserve(ramdisk_image, ramdisk_end - ramdisk_image);
    	}
    #endif
    
    	/* Call the subarch specific early setup function */
    	switch (boot_params.hdr.hardware_subarch) {
    	case X86_SUBARCH_MRST:
    		x86_mrst_early_setup();
    		break;
    	case X86_SUBARCH_CE4100:
    		x86_ce4100_early_setup();
    		break;
    	default:
    		i386_default_early_setup();
    		break;
    	}
    
    	/*
    	 * At this point everything still needed from the boot loader
    	 * or BIOS or kernel text should be early reserved or marked not
    	 * RAM in e820. All other memory is free game.
    	 */
    
    	start_kernel();
    }