Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 89356 Details for
Bug 137043
app-benchmarks/nbench-2.2.2 [PATCH] fix CPU detection on alpha
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
nbench-byte-2.2.2-alpha.patch
nbench-byte-2.2.2-alpha.patch (text/plain), 2.30 KB, created by
Thomas Cort (RETIRED)
on 2006-06-16 17:21:16 UTC
(
hide
)
Description:
nbench-byte-2.2.2-alpha.patch
Filename:
MIME Type:
Creator:
Thomas Cort (RETIRED)
Created:
2006-06-16 17:21:16 UTC
Size:
2.30 KB
patch
obsolete
>diff -urN nbench-byte-2.2.2.orig/hardware.c nbench-byte-2.2.2/hardware.c >--- nbench-byte-2.2.2.orig/hardware.c 2003-06-09 16:45:12.000000000 -0400 >+++ nbench-byte-2.2.2/hardware.c 2006-06-16 20:04:46.000000000 -0400 >@@ -82,6 +82,52 @@ > while(NULL != fgets(buffer, BUF_SIZ, info)){ > buffer_end = buffer + strlen(buffer); > cp = buffer; >+#ifdef __alpha__ >+ if(! strncmp(buffer, "cpus detected",13)) { >+ char cpus_detected[BUF_SIZ]; >+ cp+=strlen("cpus detected"); >+ while(cp < buffer_end && ( *cp == ' ' || *cp == ':'|| *cp == '\t')) >+ cp++; >+ strcpy(cpus_detected, cp); >+ removeNewLine(cpus_detected); >+ cpus = atoi(cpus_detected); >+ } else if(! strncmp(buffer, "system type", 11)) { >+ cp+=strlen("system type"); >+ while(cp < buffer_end && ( *cp == ' ' || *cp == ':'|| *cp == '\t')) >+ cp++; >+ if(cp<buffer_end) { >+ strcpy(vendor_id, cp); >+ } >+ removeNewLine(vendor_id); >+ } else if(! strncmp(buffer, "cpu model", 9)) { >+ cp+=strlen("cpu model"); >+ while(cp < buffer_end && ( *cp == ' ' || *cp == ':'|| *cp == '\t')) >+ cp++; >+ if(cp<buffer_end) { >+ strcpy(model_name, cp); >+ } >+ removeNewLine(model_name); >+ } else if(! strncmp(buffer, "L2 cache", 8)) { >+ cp+=strlen("L2 cache"); >+ while(cp < buffer_end && ( *cp == ' ' || *cp == ':'|| *cp == '\t')) >+ cp++; >+ if(cp<buffer_end) { >+ strcpy(cache, cp); >+ for (i = 0; cache[i] != 'K'; i++); >+ cache[i++] = ' '; cache[i++] = 'K'; >+ cache[i++] = 'B'; cache[i++] = '\0'; >+ } >+ } else if(! strncmp(buffer, "cycle frequency [Hz]", 20)) { >+ cp+=strlen("cycle frequency [Hz]"); >+ while(cp < buffer_end && ( *cp == ' ' || *cp == ':'|| *cp == '\t')) >+ cp++; >+ if(cp<buffer_end) { >+ strcpy(cpu_MHz, cp); >+ for (i = 0; cpu_MHz[i] != ' '; i++); >+ cpu_MHz[i] = '\0'; >+ sprintf(cpu_MHz,"%lf",strtod(cpu_MHz, NULL)/1000000); >+ } >+#else > if(! strncmp(buffer, "processor", 9)) { > cpus++; > } else if(! strncmp(buffer, "vendor_id", 9)) { >@@ -116,6 +162,7 @@ > strcpy(cache, cp); > } > removeNewLine(cache); >+#endif > } > } > if(cpus>1) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 137043
:
89356
|
96077
|
175140
|
175141