Ignore:
Timestamp:
2010-07-02T15:42:19Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bbfdf62
Parents:
e3ee9b9
Message:

improve kernel function tracing

  • add support for more generic kernel sources
  • replace attribute((no_instrument_function)) with NO_TRACE macro (shorter and for future compatibility with different compilers)
  • to be on the safe side, do not instrument most of the inline and static functions (plus some specific non-static functions)

collateral code cleanup (no change in functionality)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/interrupt.h

    re3ee9b9 r7a0359b  
    3939#include <typedefs.h>
    4040#include <arch/regdef.h>
     41#include <trace.h>
    4142
    42 #define IVT_ITEMS       15
    43 #define IVT_FIRST       1
     43#define IVT_ITEMS  15
     44#define IVT_FIRST  1
    4445
    4546/* This needs to be defined for inter-architecture API portability. */
    46 #define VECTOR_TLB_SHOOTDOWN_IPI        0
     47#define VECTOR_TLB_SHOOTDOWN_IPI  0
    4748
    4849enum {
    4950        IPI_TLB_SHOOTDOWN = VECTOR_TLB_SHOOTDOWN_IPI
    50 };             
     51};
    5152
    5253typedef struct istate {
    53         uint64_t        tnpc;
    54         uint64_t        tpc;
    55         uint64_t        tstate;
     54        uint64_t tnpc;
     55        uint64_t tpc;
     56        uint64_t tstate;
    5657} istate_t;
    5758
    58 static inline void istate_set_retaddr(istate_t *istate, uintptr_t retaddr)
     59NO_TRACE static inline void istate_set_retaddr(istate_t *istate,
     60    uintptr_t retaddr)
    5961{
    6062        istate->tpc = retaddr;
    6163}
    6264
    63 static inline int istate_from_uspace(istate_t *istate)
     65NO_TRACE static inline int istate_from_uspace(istate_t *istate)
    6466{
    6567        return !(istate->tstate & TSTATE_PRIV_BIT);
    6668}
    6769
    68 static inline unative_t istate_get_pc(istate_t *istate)
     70NO_TRACE static inline unative_t istate_get_pc(istate_t *istate)
    6971{
    7072        return istate->tpc;
    7173}
    7274
    73 static inline unative_t istate_get_fp(istate_t *istate)
     75NO_TRACE static inline unative_t istate_get_fp(istate_t *istate)
    7476{
    75         return 0;       /* TODO */
     77        /* TODO */
     78       
     79        return 0;
    7680}
    7781
Note: See TracChangeset for help on using the changeset viewer.