Skip to contentSkip to conversation

get_cycles/get_tbl on 405

DISCUSSION andrew may 3 participants 5 messages Aug 24, 2001 – Aug 27, 2001

lore
Share & tools
lore

andrew may

author
#0 lore raw

I wanted to do some quick time measurements of some things on a driver running of the 405GP and I eneded up using get_tbl(). It seems like get_cycles should be the more standard way to get a tick count but it seems to return 0. I don't get the __ftr_fixup stuff in timex.h so I am not sure what it is trying to do differently from get_tbl.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 6 lines

I wanted to do some quick time measurements of some things on a driver running of the 405GP and I eneded up using get_tbl(). It seems like get_cycles should be the more standard way to get a tick count but it seems to return 0. I don't get the __ftr_fixup stuff in timex.h so I am not sure what it is trying to do differently from get_tbl.

The __ftr_fixup in timex.h adds a reference to this code in the feature fixup section. This allow the code that access the TB to be nop'ed out on CPUs that don't implement it (601)

Ben.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#2 lore raw
In reply to andrew may
Quoted 4 lines · andrew may

I wanted to do some quick time measurements of some things on a driver running of the 405GP and I eneded up using get_tbl(). It seems like get_cycles....

Hmmm....these look like they should work exactly the same..... It would help me if you could disassemble a little code snippet around the place you use these so we could have a look.

Thanks.

	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#3 lore raw
Quoted 9 lines · Dan Malek
Quoted 4 lines · andrew may

I wanted to do some quick time measurements of some things on a driver running of the 405GP and I eneded up using get_tbl(). It seems like get_cycles....

Hmmm....these look like they should work exactly the same..... It would help me if you could disassemble a little code snippet around the place you use these so we could have a look.

They did. I just confused myself with too many kernel versions. The 2.4.2 mvista kernel didn't have the same header file, but by just sticking the newer header in there with the one other header it pulls in along with it, it worked fine.

The __ftr_fixup doesn't seem to be used much in any of the other arch's.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#4 lore raw
Quoted 1 line · [email protected] wrote:

They did. I just confused myself with too many kernel versions.

Cool.

Quoted 2 lines

The __ftr_fixup doesn't seem to be used much in any of the other arch's.

It's a PowerPC thing that Ben recently added to make it easier for us to manage the minor differences among the processor variations.

	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/