some options we may use, 1) don't call StackGrowthDirection(), hardcode JS_STACK_GROWTH_DIRECTION for Solaris 2) use "-g" to compile jscpucfg.c, it will avoid inline for Sun Studio. 3) put StackGrowthDirection() into another C file, maybe we can avoid it be inlined for all/most compilers 4) use a function pointer for StackGrowthDirection(), maybe we can avoid it be inlined for all/most compilers
Created attachment 265231 [details] [diff] [review] Add "-g" to prevent StackGrowthDirection from being inlined
at least we should use MOZ_DEBUG_FLAGS instead of "-g"
Created attachment 265237 [details] [diff] [review] Use more general "MOZ_DEBUG_FLAGS" instead of "-g"
It would be better to define NS_NEVER_INLINE to something that your compiler respects -- is there such a pragma? $ grep NS_NEVER_INLINE *.[ch] jscpucfg.c:#define NS_NEVER_INLINE __attribute__((noinline)) jscpucfg.c:#define NS_NEVER_INLINE jscpucfg.c:static int NS_NEVER_INLINE StackGrowthDirection(int *dummy1addr) /be
Created attachment 265477 [details] [diff] [review] patch that uses #pragma for Sun Studio I forgot Sun Studio C does have no_inline pragma. But it's not as same as gcc. I've to declare the function first. Sun Studio 12 will have same attributes ability as gcc.
Comment on attachment 265477 [details] [diff] [review] patch that uses #pragma for Sun Studio r=me, thanks. /be
Comment on attachment 265477 [details] [diff] [review] patch that uses #pragma for Sun Studio brendan, can you commit this for me? Also, I think it's important for 1.5.x and 2.0.x. BTW: #pragma no_inline only works for Sun Studio C compiler not C++. "-g" option only disables inlining for Sun Studio C++ compiler. So this approach is the correct one.
This should certainly not block a branch release, in my opinion.
Not blocking _us_, but Sun (and other vendors) are committed to longer branch support than Mozilla.
Comment on attachment 265477 [details] [diff] [review] patch that uses #pragma for Sun Studio Approved for 220.127.116.11 and 18.104.22.168, a=dveditz for release-drivers
Probably this should be assigned to crowder, who did the checkin, rather than to ginn.chen. /be
MOZILLA_1_8_BRANCH: jscpucfg.c: 22.214.171.124 MOZILLA_1_8_0_BRANCH: jscpucfg.c: 126.96.36.199