[2.1.4] Strange CPU speed

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
ducon
Posts: 186
Joined: Sun Dec 21, 2003 1:11 am
Contact:

[2.1.4] Strange CPU speed

Post by ducon »

This is a very minor bug but when I launch ZDoom in a console, I see this (see line 3):

Code: Select all

 adding /usr/local/bin/zdoom.pk3
 adding /usr/share/games/doom/doom2.wad (2956 lumps)
CPU Speed: ~0.062134 MHz
CPU Vendor ID: GenuineIntel
  Name: Intel(R) Celeron(R) CPU 2.66GHzn(R) CPU 2.66GHz
  Family 15, Model 3, Stepping 3
  Features: MMX SSE SSE2 SSE3
  [cut]
Gah, a 60 kHz CPU. I run it with a Debian Etch on x86. The CPU speed is correct two lines after.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49229
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

User avatar
ducon
Posts: 186
Joined: Sun Dec 21, 2003 1:11 am
Contact:

Post by ducon »

OK, so the bug is still there.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49229
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Don't blame me that Linux apparently doesn't have a decent timer to calculate the CPU speed.
If you have an idea how to do it better you are welcome of course.
User avatar
ducon
Posts: 186
Joined: Sun Dec 21, 2003 1:11 am
Contact:

Post by ducon »

It seems that the correct code uses /proc/cpuinfo, no?
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

I was looking into the kernel source and found cpufreq_get(int cpu) but I can't figure out how to get it to work outside of the kernel source itself.
Hobbs
Posts: 212
Joined: Mon Jul 11, 2005 3:41 pm

Post by Hobbs »

Its not just Linux. On my laptop it always lists the current processor speed (because, you know, its a Pentium M, so the CPU speed changes) in ZDoom, never the max unless my processor is using the max on any line of the console.

Also on this line

Code: Select all

Intel(R) Pentium(R) M processor 2.2GHz 2.2Ghz
Why is the processor speed listed twice?
User avatar
ducon
Posts: 186
Joined: Sun Dec 21, 2003 1:11 am
Contact:

Post by ducon »

Perhaps because we did not overclock our processor?
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Post by randi »

DoomerX wrote:

Code: Select all

Intel(R) Pentium(R) M processor 2.2GHz 2.2Ghz
Why is the processor speed listed twice?
Because that is the string returned by the processor's CPUID instruction, and Intel decided to store the processor's nominal frequency in it twice.

The CPU frequency is only calculated for doing high-precision statistical timings with RDTSC, so it's not like this really matters to most people anyway.
Post Reply

Return to “Closed Bugs [GZDoom]”