1. 14 Dec, 2009 13 commits
    • Michal Simek's avatar
      microblaze: ftrace: Add dynamic function graph tracer · 4f911b0d
      Michal Simek authored
      This patch add support for dynamic function graph tracer.
      
      There is one my expactation that I can do flush_icache after
      all code modification. On microblaze is this safer than do
      flush for every entry. For icache is used name flush but
      correct should be invalidation - this will be fix in upcomming
      new cache implementaion and WB support.
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      4f911b0d
    • Michal Simek's avatar
      microblaze: ftrace: add function graph support · a0d3e665
      Michal Simek authored
      For more information look at Documentation/trace folder.
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      a0d3e665
    • Michal Simek's avatar
      microblaze: ftrace: Add dynamic trace support · 7d241ff0
      Michal Simek authored
      With dynamic function tracer, by default, _mcount is defined as an
      "empty" function, it returns directly without any more action. When
      enabling it in user-space, it will jump to a real tracing
      function(ftrace_caller), and do the real job for us.
      
      Differ from the static function tracer, dynamic function tracer provides
      two functions ftrace_make_call()/ftrace_make_nop() to enable/disable the
      tracing of some indicated kernel functions(set_ftrace_filter).
      
      In the kernel version, there is only one "_mcount" string for every
      kernel function, so, we just need to match this one in mcount_regex of
      scripts/recordmcount.pl.
      
      For more information please look at code and Documentation/trace folder.
      
      Steven ACK that scripts/recordmcount.pl part.
      Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      7d241ff0
    • Michal Simek's avatar
      microblaze: ftrace: enable HAVE_FUNCTION_TRACE_MCOUNT_TEST · 6d9e60ce
      Michal Simek authored
      Implement MCOUNT_TEST in asm code - it is faster than use
      generic code
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      6d9e60ce
    • Michal Simek's avatar
      microblaze: ftrace: add static function tracer · 2fd7c761
      Michal Simek authored
      If -pg of gcc is enabled with CONFIG_FUNCTION_TRACER=y. a calling to
      _mcount will be inserted into each kernel function. so, there is a
      possibility to trace the kernel functions in _mcount.
      
      This patch add the specific _mcount support for static function
      tracing. by default, ftrace_trace_function is initialized as
      ftrace_stub(an empty function), so, the default _mcount will introduce
      very little overhead. after enabling ftrace in user-space, it will jump
      to a real tracing function and do static function tracing for us.
      
      Commit message from Wu Zhangjin <wuzhangjin@gmail.com>
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      2fd7c761
    • Michal Simek's avatar
      microblaze: Add TRACE_IRQFLAGS_SUPPORT · a3cd613b
      Michal Simek authored
      There are just two major changes
      Renamed local_irq functions to raw_local_irq in irq.c.
      Added TRACE_IRQFLAGS_SUPPORT to Kconfig.debug.
      
      Look at Documentation/irqflags-tracing.txt
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      a3cd613b
    • Michal Simek's avatar
    • Michal Simek's avatar
      microblaze: Lockdep support · bf2d8096
      Michal Simek authored
      Microblaze needs to do lock_init very soon because MMU init calls lock functions.
      
      Here is the explanation from Peter Zijlstra why we have to enable
      __ARCH_WANTS_INTERRUPTS_ON_CTSW.
      
      "So we schedule while holding rq->lock (for obvious reasons), but since
      lockdep tracks held locks per tasks, we need to transfer the held state
      from the prev to the next task. We do this by explicity calling
      spin_release(&rq->lock) in context_switch() right before switch_to(),
      and calling spin_acquire(&rq->lock) in
      finish_task_switch()->finish_lock_switch().
      
      Now, for some reason lockdep thinks that interrupts got enabled over the
      context switch (git grep __ARCH_WANTS_INTERRUPTS_ON_CTSW arch/microblaze
      doesn't seem to turn up anything).
      
      Clearly trying to acquire the rq->lock with interrupts enabled is a bad
      idea and lockdep warns you about this."
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      bf2d8096
    • Michal Simek's avatar
      microblaze: Register timecounter/cyclecounter · 519e9f41
      Michal Simek authored
      It is the same counter as we use as free running one.
      I would like to use it for ftrace.
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      519e9f41
    • Michal Simek's avatar
      microblaze: Stack trace support · 24b45a12
      Michal Simek authored
      This is working implemetation but the problem is that
      Microblaze misses frame pointer that's why is there
      big loop which trace and show all addresses which are in text.
      It shows addresses which are in registers, etc.
      
      This is problem and this is the reason why all Microblaze
      traces are wrong. There is an option to do hacks and trace
      the kernel code but this is too complicated.
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      24b45a12
    • Michal Simek's avatar
      microblaze: Add IRQENTRY_TEXT to lds · 7cf79d59
      Michal Simek authored
      It is important for ftrace irqsoff support
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      7cf79d59
    • Michal Simek's avatar
      microblaze: __init_begin symbol must be aligned · 13cdee23
      Michal Simek authored
      The problem was that free_initmem pass to  free_initrd_mem got
      bad aligned __init_begin symbol and free_initrd_mem don't care
      about __init_end but take PAGE_SIZE instead.
      
      Here is behavior in kernel bootlog.
      ramdisk_execute_command from (init/main.c) was rewrite
      
      Freeing unused kernel memory: 6224k freed
      Failed to execute ��������������{���
      Failed to execute ��������������{����.  Attempting defaults...
      Mounting proc:
      Mounting var:
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      13cdee23
    • Michal Simek's avatar
      microblaze: GPIO reset support · 42a2478b
      Michal Simek authored
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      42a2478b
  2. 12 Dec, 2009 27 commits