Author: [EMAIL PROTECTED]
Date: Wed Oct 22 02:46:09 2008
New Revision: 550
Modified:
branches/bleeding_edge/src/SConscript
branches/bleeding_edge/src/objects-inl.h
branches/bleeding_edge/src/objects.cc
branches/bleeding_edge/src/objects.h
branches/bleeding_edge/tools/linux-tick-processor.py
Log:
Incorporate patches by Paolo Giarrusso to allow profiling
C++ functions in shared libraries, building in directories
containing spaces, and using named constants better.
Review URL: http://codereview.chromium.org/7864
Modified: branches/bleeding_edge/src/SConscript
==============================================================================
--- branches/bleeding_edge/src/SConscript (original)
+++ branches/bleeding_edge/src/SConscript Wed Oct 22 02:46:09 2008
@@ -109,7 +109,7 @@
env.Replace(**context.flags['v8'])
context.ApplyEnvOverrides(env)
env['BUILDERS']['JS2C'] = Builder(action=js2c.JS2C)
- env['BUILDERS']['Snapshot'] = Builder(action='$SOURCE $TARGET --logfile
$LOGFILE')
+ env['BUILDERS']['Snapshot'] = Builder(action='$SOURCE $TARGET
--logfile "$LOGFILE"')
# Build the standard platform-independent source files.
source_files = context.GetRelevantSources(SOURCES)
Modified: branches/bleeding_edge/src/objects-inl.h
==============================================================================
--- branches/bleeding_edge/src/objects-inl.h (original)
+++ branches/bleeding_edge/src/objects-inl.h Wed Oct 22 02:46:09 2008
@@ -1160,7 +1160,7 @@
bool Dictionary::requires_slow_elements() {
- Object* max_index_object = get(kPrefixStartIndex);
+ Object* max_index_object = get(kMaxNumberKeyIndex);
if (!max_index_object->IsSmi()) return false;
return 0 !=
(Smi::cast(max_index_object)->value() & kRequiresSlowElementsMask);
@@ -1169,7 +1169,7 @@
uint32_t Dictionary::max_number_key() {
ASSERT(!requires_slow_elements());
- Object* max_index_object = get(kPrefixStartIndex);
+ Object* max_index_object = get(kMaxNumberKeyIndex);
if (!max_index_object->IsSmi()) return 0;
uint32_t value =
static_cast<uint32_t>(Smi::cast(max_index_object)->value());
return value >> kRequiresSlowElementsTagSize;
Modified: branches/bleeding_edge/src/objects.cc
==============================================================================
--- branches/bleeding_edge/src/objects.cc (original)
+++ branches/bleeding_edge/src/objects.cc Wed Oct 22 02:46:09 2008
@@ -3924,7 +3924,10 @@
static inline uint32_t HashField(uint32_t hash, bool is_array_index) {
- return (hash << String::kLongLengthShift) | (is_array_index ? 3 : 1);
+ uint32_t result =
+ (hash << String::kLongLengthShift) | String::kHashComputedMask;
+ if (is_array_index) result |= String::kIsArrayIndexMask;
+ return result;
}
@@ -6067,13 +6070,13 @@
// Check if this index is high enough that we should require slow
// elements.
if (key > kRequiresSlowElementsLimit) {
- set(kPrefixStartIndex, Smi::FromInt(kRequiresSlowElementsMask));
+ set(kMaxNumberKeyIndex, Smi::FromInt(kRequiresSlowElementsMask));
return;
}
// Update max key value.
- Object* max_index_object = get(kPrefixStartIndex);
+ Object* max_index_object = get(kMaxNumberKeyIndex);
if (!max_index_object->IsSmi() || max_number_key() < key) {
- set(kPrefixStartIndex, Smi::FromInt(key <<
kRequiresSlowElementsTagSize));
+ set(kMaxNumberKeyIndex, Smi::FromInt(key <<
kRequiresSlowElementsTagSize));
}
}
Modified: branches/bleeding_edge/src/objects.h
==============================================================================
--- branches/bleeding_edge/src/objects.h (original)
+++ branches/bleeding_edge/src/objects.h Wed Oct 22 02:46:09 2008
@@ -1966,11 +1966,11 @@
// Accessors for next enumeration index.
void SetNextEnumerationIndex(int index) {
- fast_set(this, kNextEnumnerationIndexIndex, Smi::FromInt(index));
+ fast_set(this, kNextEnumerationIndexIndex, Smi::FromInt(index));
}
int NextEnumerationIndex() {
- return Smi::cast(get(kNextEnumnerationIndexIndex))->value();
+ return Smi::cast(get(kNextEnumerationIndexIndex))->value();
}
// Returns a new array for dictionary usage. Might return Failure.
@@ -2014,7 +2014,7 @@
Object* GenerateNewEnumerationIndices();
static const int kMaxNumberKeyIndex = kPrefixStartIndex;
- static const int kNextEnumnerationIndexIndex = kMaxNumberKeyIndex + 1;
+ static const int kNextEnumerationIndexIndex = kMaxNumberKeyIndex + 1;
DISALLOW_IMPLICIT_CONSTRUCTORS(Dictionary);
};
Modified: branches/bleeding_edge/tools/linux-tick-processor.py
==============================================================================
--- branches/bleeding_edge/tools/linux-tick-processor.py (original)
+++ branches/bleeding_edge/tools/linux-tick-processor.py Wed Oct 22
02:46:09 2008
@@ -30,13 +30,18 @@
# Usage: process-ticks.py <logfile>
# Where <logfile> is the log file name (eg, v8.log).
-import os, re, sys, tickprocessor, getopt;
+import subprocess, re, sys, tickprocessor, getopt
class LinuxTickProcessor(tickprocessor.TickProcessor):
def ParseVMSymbols(self, filename, start, end):
"""Extract symbols and add them to the cpp entries."""
- pipe = os.popen('nm -n %s | c++filt' % filename, 'r')
+ # Extra both dynamic and non-dynamic symbols.
+ command = 'nm -C -n "%s"; nm -C -n -D "%s"' % (filename, filename)
+ process = subprocess.Popen(command, shell=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
+ pipe = process.stdout
try:
for line in pipe:
row = re.match('^([0-9a-fA-F]{8}) . (.*)$', line)
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---