Workaround 'inlining failed' build error with older GCC 4.x releases.

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/22867047

Patch from Ben Noordhuis <info@bnoordhuis.nl>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16309 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Support higher CPU profiler sampling rate on posix systems

New flag is added that allows to specify CPU profiler sampling rate in microseconds as command line argument. It was tested to work fine with 100us interval(currently it is 1ms). Default values are kept the same as in the current implementation. The new implementation is enabled only on POSIX platforms which use signals to collect samples. Other platforms that pause thread being sampled are to follow.

SIGPROF signals are now sent on the profiler event processor thread to make sure that the processing thread does fall far behind the sampling.

The patch is based on the previous one that was rolled out in r13851. The main difference is that the circular queue is not modified for now.

On Linux sampling for CPU profiler is initiated on the profiler event processor thread, other platforms to follow.

CPU profiler continues to use SamplingCircularQueue, we will probably replace it with a single sample buffer when Mac and Win ports support profiling on the event processing thread.

When --prof option is specified profiling is initiated either on the profiler event processor thread if CPU profiler is on or on the SignalSender thread as it used to be if no CPU profiles are being collected.

ProfilerEventsProcessor::ProcessEventsAndDoSample now waits in a tight loop, processing collected samples until sampling interval expires. To save CPU resources I'm planning to change that to use nanosleep as only one sample is expected in the queue at any point.

BUG=v8:2814
R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/21101002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16310 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Add V8_ALIGNOF() and use that in lazy-instance.h.

Also fix the inconsistent attribute naming, and make V8_GNUC_PREREQ() test work for GCC compatible compilers.

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/22888008

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Deprecate CpuProfileNode::GetSelfSamplesCount

This method is being replaced by GetHitCount.

BUG=267595
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/22295009

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16312 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Revert "Add V8_ALIGNOF() and use that in lazy-instance.h."

This reverts commit r16311 for breaking build with certain compilers.
Will reland once sorted out.

TBR=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/22979004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16313 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Further cleanup of test for V8_INFINITY.

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/23202017

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16314 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Fix the CPU feature detection.

Move all of the CPU detection logic to the CPU class, and make
all other code use the CPU class for feature detection.

This also fixes the ARM CPU feature detection logic, which was
based on fragile string search in /proc/cpuinfo. Now we use
ELF hwcaps if available, falling back to sane(!!) parsing of
/proc/cpuinfo for CPU features.

The ia32 and x64 code was also cleaned up to make it usable
outside the assembler.

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/23401002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16315 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
abstract eternal into class

R=rossberg@chromium.org, svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/22795004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16316 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
fix 16316 debug check

TBR=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/22831050

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16317 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Add V8_ALIGNAS() and V8_ALIGNOF() and use that in lazy-instance.h.

This renames the existing V8_ALIGNAS() to V8_ALIGNED(), and introduces
V8_ALIGNAS(type, alignment) which aligns according to the type and falls
back to aligning according to alignment.

Also use __attribute__((aligned(n))) instead of __attribute__((__aligned__(n))).

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/22999052

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Add a trap_on_abort flag

By setting this flag assertions behind --debug-code will trigger a
breakpoint instead of a call into Abort. This eases debugging, as the
call site is less cluttered and the backtrace starts where it should.

BUG=
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/23352004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16319 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Use signals for cpu profiling on Mac OS X

A while ago in r2315 Mac OS X cpu profiler implementation was changed to pause sampled thread instead of sending SIGPROF signal. That was done because at that point profiler send the signal to the whole process and it was handled on a random thread. Now that signal-based implementation uses pthread_kill it may well be used on Mac OS X too.

BUG=v8:2814
R=bmeurer@chromium.org, svenpanne@chromium.org

Review URL: https://codereview.chromium.org/23115005

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16320 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
js accessor creation on Template

R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/22903012

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16321 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Arm support for DoubleToIStub (truncating).

Added support for truncating DoubleToIStub and reorganize the macro-assembler
dToI operations to do the fast-path inline and the slow path by calling the
stub.

BUG=
R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/23129003

Patch from Ross McIlroy <rmcilroy@google.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16322 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Store mode for keyed stores should be passed in from type feedback
regardless of the map used in polymorphic stores.

BUG=
R=jkummerow@chromium.org, verwaest@chromium.org

Review URL: https://codereview.chromium.org/21058003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Lower kInitialMaxFastElementArray constant to 95K

to work around erroneous "illegal access" error on x64.

BUG=v8:2790
R=hpayer@chromium.org

Review URL: https://codereview.chromium.org/22877039

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16324 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Fix NaCl build after r16322.

R=machenbach@chromium.org

Review URL: https://codereview.chromium.org/22887053

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16327 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Remove flag aliases for parallel recompilation.

R=machenbach@chromium.org
BUG=

Review URL: https://codereview.chromium.org/23125027

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Port CompileMathFloorCall from ia32 to x64

BUG=
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/23264022

Patch from Weiliang Lin <weiliang.lin2@gmail.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16329 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Make sure semaphore used in Profiler is deleted

BUG=None
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/23420004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16330 ce2b1a6d-e550-0410-aec6-3dcde31c8c00