> >
> > Also, can't you ask the compiler to produce both sse and non-sse code and
> > make a decision at runtime?
> >
> 
> Not that I know of. At least GCC documentation does no list anything about
> that here, http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86-64-Options.html
> 
> -mfpmath=both or -mfpmath=sse+387 does not seem to be doing that; instead
> it seems to be about using both in the same code path.

in an ideal world we could use __attribute__((target("whatever"))) but
we'd need a newer gcc, and only gcc supports that atm afaik.  What we've
done in other places where using ssee2 is a big win is to add a second
file that we compile with -msse2 and then we do some runtime detection
(mozilla/SSE.h) and then we only call into the file compiled with
-mssse2 if the runtime detection says we have sse.

Trev

> 
> Benoit
> 
> 
> >
> >
> >> 2014-05-09 13:01 GMT-04:00 Chris Peterson <cpeter...@mozilla.com>:
> >>
> >> > What does requiring SSE2 buy us? 1% of hundreds of millions of Firefox
> >> > users is still millions of people.
> >> >
> >> > chris
> >> >
> >> >
> >> >
> >> > On 5/8/14, 5:42 PM, matthew.br...@gmail.com wrote:
> >> >
> >> >> On Tuesday, January 3, 2012 4:37:53 PM UTC-8, Benoit Jacob wrote:
> >> >>
> >> >>> 2012/1/3 Jeff Muizelaar <jmuizel...@mozilla.com>:
> >> >>>
> >> >>>
> >> >>>>
> >> >>>  On 2012-01-03, at 2:01 PM, Benoit Jacob wrote:
> >> >>>>
> >> >>>
> >> >>>
> >> >>>>
> >> >>>  2012/1/2 Robert Kaiser <ka...@kairo.at>:
> >> >>>>
> >> >>>
> >> >>>
> >> >>>>
> >> >>>  Jean-Marc Desperrier schrieb:
> >> >>>>
> >> >>>
> >> >>>
> >> >>>>
> >> >>>
> >> >>>>
> >> >>>  According to https://bugzilla.mozilla.org/show_bug.cgi?id=594160#c6,
> >> >>>>
> >> >>>
> >> >>>
> >> >>>>
> >> >>>  the Raw Dump tab on crash-stats.mozilla.com shows the needed
> >> >>>>
> >> >>>
> >> >>>
> >> >>>>
> >> >>>  information, you need to sort out from the info on the second line
> >> CPU
> >> >>>>
> >> >>>
> >> >>>
> >> >>>>
> >> >>>  maker, family, model, and stepping information whether SSE2 is there
> >> or
> >> >>>>
> >> >>>
> >> >>>
> >> >>>>
> >> >>>  not (With a little search, I can find that info again, bug 593117
> >> gives
> >> >>>>
> >> >>>
> >> >>>
> >> >>>>
> >> >>>  a formula that's correct for most of the cases).
> >> >>>>
> >> >>>
> >> >>>
> >> >>>>
> >> >>>
> >> >>>>
> >> >>>
> >> >>>>
> >> >>>  https://crash-analysis.mozilla.com/crash_analysis/ holds
> >> >>>>
> >> >>>
> >> >>>
> >> >>>>
> >> >>>  *-pub-crashdata.csv.gz files that have that info from all Firefox
> >> >>>>
> >> >>>
> >> >>>
> >> >>>>
> >> >>>  desktop/mobile crashes on a given day, you should be able to analyze
> >> >>>> that
> >> >>>>
> >> >>>
> >> >>>
> >> >>>>
> >> >>>  for this info - with a bias, of course, as it's only people having
> >> >>>> crashes
> >> >>>>
> >> >>>
> >> >>>
> >> >>>>
> >> >>>  that you see there. No idea if the less biased telemetry samples have
> >> >>>> that
> >> >>>>
> >> >>>
> >> >>>
> >> >>>>
> >> >>>  info as well.
> >> >>>>
> >> >>>
> >> >>>
> >> >>>>
> >> >>>
> >> >>>>
> >> >>>  On yesterday's crash data, assuming that AuthenticAMD\ family\
> >> >>>>
> >> >>>
> >> >>>  [1-6][^0-9]  is the proper way to identify these old AMD CPUs (I
> >> >>>>
> >> >>>
> >> >>>  didn't check that very well), I get these results:
> >> >>>>
> >> >>>
> >> >>>
> >> >>>>
> >> >>>
> >> >>>>
> >> >>>  The measurement I have used in the past was:
> >> >>>>
> >> >>>
> >> >>>
> >> >>>>
> >> >>>  CPUs have sse2 if:
> >> >>>>
> >> >>>
> >> >>>
> >> >>>>
> >> >>>  if vendor == AuthenticAMD and family >= 15
> >> >>>>
> >> >>>
> >> >>>  if vendor == GenuineIntel and family >= 15 or (family == 6 and (model
> >> >>>> == 9
> >> >>>>
> >> >>>
> >> >>>  or model > 11))
> >> >>>>
> >> >>>
> >> >>>  if vendor == CentaurHauls and family >= 6 and model >= 10
> >> >>>>
> >> >>>
> >> >>>
> >> >>>>
> >> >>>
> >> >>>
> >> >>> Thanks.
> >> >>>
> >> >>>
> >> >>>
> >> >>> AMD and Intel CPUs amount to 296362 crashes:
> >> >>>
> >> >>>
> >> >>>
> >> >>> bjacob@cahouette:~$ egrep AuthenticAMD\|GenuineIntel
> >> >>>
> >> >>> 20120102-pub-crashdata.csv | wc -l
> >> >>>
> >> >>> 296362
> >> >>>
> >> >>>
> >> >>>
> >> >>> Counting SSE2-capable CPUs:
> >> >>>
> >> >>>
> >> >>>
> >> >>> bjacob@cahouette:~$ egrep GenuineIntel\ family\ 1[5-9]
> >> >>>
> >> >>> 20120102-pub-crashdata.csv | wc -l
> >> >>>
> >> >>> 58490
> >> >>>
> >> >>> bjacob@cahouette:~$ egrep GenuineIntel\ family\ [2-9][0-9]
> >> >>>
> >> >>> 20120102-pub-crashdata.csv | wc -l
> >> >>>
> >> >>> 0
> >> >>>
> >> >>> bjacob@cahouette:~$ egrep GenuineIntel\ family\ 6\ model\ 9
> >> >>>
> >> >>> 20120102-pub-crashdata.csv | wc -l
> >> >>>
> >> >>> 792
> >> >>>
> >> >>> bjacob@cahouette:~$ egrep GenuineIntel\ family\ 6\ model\ 1[2-9]
> >> >>>
> >> >>> 20120102-pub-crashdata.csv | wc -l
> >> >>>
> >> >>> 52473
> >> >>>
> >> >>> bjacob@cahouette:~$ egrep GenuineIntel\ family\ 6\ model\ [2-9][0-9]
> >> >>>
> >> >>> 20120102-pub-crashdata.csv | wc -l
> >> >>>
> >> >>> 103655
> >> >>>
> >> >>> bjacob@cahouette:~$ egrep AuthenticAMD\ family\ 1[5-9]
> >> >>>
> >> >>> 20120102-pub-crashdata.csv | wc -l
> >> >>>
> >> >>> 59463
> >> >>>
> >> >>> bjacob@cahouette:~$ egrep AuthenticAMD\ family\ [2-9][0-9]
> >> >>>
> >> >>> 20120102-pub-crashdata.csv | wc -l
> >> >>>
> >> >>> 8120
> >> >>>
> >> >>>
> >> >>>
> >> >>> Total SSE2 capable CPUs:
> >> >>>
> >> >>>
> >> >>>
> >> >>> 58490 + 792 + 52473 + 103655 + 59463 + 8120 = 282993
> >> >>>
> >> >>>
> >> >>>
> >> >>> 1 - 282993 / 296362 = 0.045
> >> >>>
> >> >>>
> >> >>>
> >> >>> So the proportion of non-SSE2-capable CPUs among crash reports is 4.5
> >> %.
> >> >>>
> >> >>
> >> >> Just for the record, I coded this analysis up here:
> >> >> https://gist.github.com/matthew-brett/9cb5274f7451a3eb8fc0
> >> >>
> >> >> SSE2 apparently now at about one percent:
> >> >>
> >> >>      20120102-pub-crashdata.csv.gz: 4.53
> >> >>      20120401-pub-crashdata.csv.gz: 4.24
> >> >>      20120701-pub-crashdata.csv.gz: 2.77
> >> >>      20121001-pub-crashdata.csv.gz: 2.83
> >> >>      20130101-pub-crashdata.csv.gz: 2.66
> >> >>      20130401-pub-crashdata.csv.gz: 2.59
> >> >>      20130701-pub-crashdata.csv.gz: 2.20
> >> >>      20131001-pub-crashdata.csv.gz: 1.92
> >> >>      20140101-pub-crashdata.csv.gz: 1.86
> >> >>      20140401-pub-crashdata.csv.gz: 1.12
> >> >>
> >> >> Cheers,
> >> >>
> >> >> Matthew
> >> >>
> >> >>
> >> > _______________________________________________
> >> > dev-platform mailing list
> >> > dev-platform@lists.mozilla.org
> >> > https://lists.mozilla.org/listinfo/dev-platform
> >> >
> >> _______________________________________________
> >> dev-platform mailing list
> >> dev-platform@lists.mozilla.org
> >> https://lists.mozilla.org/listinfo/dev-platform
> >>
> >
> >
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform

Attachment: signature.asc
Description: Digital signature

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to