Changeset c621f4aa in mainline for kernel/arch/amd64/include/cycle.h


Ignore:
Timestamp:
2010-07-25T10:11:13Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, topic/msim-upgrade, topic/simplify-dev-export
Children:
377cce8
Parents:
24a2517 (diff), a2da43c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge with mainline.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/include/cycle.h

    r24a2517 rc621f4aa  
    3636#define KERN_amd64_CYCLE_H_
    3737
    38 extern uint64_t get_cycle(void);
     38#include <trace.h>
     39
     40NO_TRACE static inline uint64_t get_cycle(void)
     41{
     42        uint32_t lower;
     43        uint32_t upper;
     44       
     45        asm volatile (
     46                "rdtsc\n"
     47                : "=a" (lower),
     48                  "=d" (upper)
     49        );
     50       
     51        return ((uint64_t) lower) | (((uint64_t) upper) << 32);
     52}
    3953
    4054#endif
Note: See TracChangeset for help on using the changeset viewer.