Skip to content

Commit

Permalink
Merge pull request #1 from janeasystems/mobile-master
Browse files Browse the repository at this point in the history
update
  • Loading branch information
quanganh206 authored Jun 26, 2018
2 parents e67e150 + 3bde748 commit a7eb45d
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 8 deletions.
6 changes: 3 additions & 3 deletions deps/chakrashim/core/lib/Common/Memory/HeapBlockMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class HeapBlockMap32
// Segment mapping

static const uint L1Count = 4096;
static const uint L2Count = 256;
static const uint PageSize = AutoSystemInfo::PageSize; // 4096
static const uint L2Count = (1<<20) / AutoSystemInfo::PageSize; // L2 spans 1MB of virtual pages
static const uint PageSize = AutoSystemInfo::PageSize; // 4K for most platforms and 16K for iOS

// Mark bit definitions

Expand Down Expand Up @@ -289,7 +289,7 @@ class HeapBlockMap64
HeapBlockMap32 map;
};

static const uint PagesPer4GB = 1 << 20; // = 1M, assume page size = 4K
static const uint PagesPer4GB = (uint) (((ULONG64)1 << 32) / AutoSystemInfo::PageSize);

static uint GetNodeIndex(void * address)
{
Expand Down
5 changes: 5 additions & 0 deletions deps/chakrashim/core/lib/Common/Memory/RecyclerHeuristic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ RecyclerHeuristic::RecyclerHeuristic()
else if (isSuccess && physicalMemoryBytes <= 1024 MEGABYTES)
{
// Tablet/slate/high-end Apollo scenario, including 512MB non-Apollo.
#if defined(__IOS__)
// 64MB is too little for the require phase of many node modules on a mobile device.
baseFactor = 192;
#else
baseFactor = 64;
#endif
this->DefaultMaxFreePageCount = 64 MEGABYTES_OF_PAGES;
this->DefaultMaxAllocPageCount = 64;
}
Expand Down
6 changes: 4 additions & 2 deletions deps/chakrashim/core/lib/Common/Memory/SectionAllocWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ class SectionMap32
#if TARGET_64
static const size_t TotalSize = 0x100000000; // 4GB
#endif

static const uint L1Count = 4096;
static const uint L2Count = 256;
static const uint L2Count = (1<<20) / AutoSystemInfo::PageSize; // L2 spans 1MB of virtual pages

static uint GetLevel1Id(void * address)
{
return ::Math::PointerCastToIntegralTruncate<uint>(address) / L2Count / AutoSystemInfo::PageSize;
Expand Down Expand Up @@ -86,7 +88,7 @@ class SectionMap64
bool EnsureSection(void * address, size_t pageCount);
void SetSectionNoCheck(void * address, size_t pageCount, SectionInfo * section);

static const uint PagesPer4GB = 1 << 20; // = 1M, assume page size = 4K
static const uint PagesPer4GB = (uint) (((ULONG64)1 << 32) / AutoSystemInfo::PageSize);

struct Node
{
Expand Down
27 changes: 26 additions & 1 deletion doc_mobile/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
</tr>
<tr>
<td>
<a href="#0.1.5">0.1.5</a><br/>
<a href="#0.1.4">0.1.4</a><br/>
<a href="#0.1.3">0.1.3</a><br/>
<a href="#0.1.2">0.1.2</a><br/>
Expand All @@ -15,8 +16,32 @@
</tr>
</table>

<a id="0.1.5"></a>
## 2018-06-07, Version 0.1.5 (Current)

### Notable Changes

* Adds method to run node tests on mobile.
* Memory optimizations on iOS.

### Commits

* [[`799a3116d3`](https://github.com/janeasystems/nodejs-mobile/commit/799a3116d3b3d7b1b83d8f28bbb8e05e1cc3ec00)] - Node.js on Mobile v0.1.5 (Jaime Bernardo)
* [[`76f8ace6a6`](https://github.com/janeasystems/nodejs-mobile/commit/76f8ace6a6e5fdae89c28a9358941c27a17a0bb9)] - ios,chakra: use 16KB page size for heap block map (Jaime Bernardo)
* [[`c91c284756`](https://github.com/janeasystems/nodejs-mobile/commit/c91c2847567e7c2cac0b789728d9c7d46402b82d)] - ios: increase baseFactor for Recycler on iOS (Jaime Bernardo)
* [[`6e878e949f`](https://github.com/janeasystems/nodejs-mobile/commit/6e878e949fd523291f9518dd79ae3aa22870a134)] - test,ios: use same timeout in proxy as test.py (Jaime Bernardo)
* [[`e67e150756`](https://github.com/janeasystems/nodejs-mobile/commit/e67e150756bc767c6fe88967d9c227ad38b2ef56)] - doc: add instructions on how to run mobile tests (Jaime Bernardo)
* [[`f123f15454`](https://github.com/janeasystems/nodejs-mobile/commit/f123f15454ed4ec03cc013e11161027b8d67163b)] - test,android: add build and proxy copy to prepare (Jaime Bernardo)
* [[`6ae749b424`](https://github.com/janeasystems/nodejs-mobile/commit/6ae749b4248bf6b22923f94cab8237369de23ed6)] - android: use release folder structure for build (Jaime Bernardo)
* [[`7bbb106289`](https://github.com/janeasystems/nodejs-mobile/commit/7bbb10628980803e9db667d401a6c0323c4d18ad)] - test,android: preload test app helper script (Jaime Bernardo)
* [[`d50f651203`](https://github.com/janeasystems/nodejs-mobile/commit/d50f6512034a34c65807e02f4761174086a78189)] - test,ios: fixes to run tests on mobile (Jaime Bernardo)
* [[`a78dabda86`](https://github.com/janeasystems/nodejs-mobile/commit/a78dabda8689510e5edf0a59af51ea511565eb8e)] - test,ios: test app to run tests on iOS (Jaime Bernardo)
* [[`954fa9cab1`](https://github.com/janeasystems/nodejs-mobile/commit/954fa9cab1323091782c53333aa2dfb7c083b761)] - test,android: fixes to run tests on mobile (Enrico Giordani)
* [[`93619f358c`](https://github.com/janeasystems/nodejs-mobile/commit/93619f358c12be284a2e35bc9bfa5f8f45fd02f1)] - test,android: test app to run tests on mobile (Enrico Giordani)
* [[`fbe535de4c`](https://github.com/janeasystems/nodejs-mobile/commit/fbe535de4c3a052d5a8948a573d40ef954a5554b)] - Working on Node.js for Mobile Apps v0.1.5 (Jaime Bernardo)

<a id="0.1.4"></a>
## 2018-03-05, Version 0.1.4 (Current)
## 2018-03-05, Version 0.1.4

### Notable Changes

Expand Down
2 changes: 1 addition & 1 deletion src/node_mobile_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#define NODE_MOBILE_MAJOR_VERSION 0
#define NODE_MOBILE_MINOR_VERSION 1
#define NODE_MOBILE_PATCH_VERSION 5
#define NODE_MOBILE_PATCH_VERSION 6

#define NODE_MOBILE_VERSION_IS_RELEASE 0

Expand Down
2 changes: 1 addition & 1 deletion tools/mobile-test/ios/node-ios-proxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ TEST_BASE_DIR="$( cd "$( dirname "$0" )" && cd .. && cd .. && cd test && pwd )"

echo "Time: $(date '+%FT%T') -> Proxying testcase: $TEMP_COMMAND" >> "$LOG_FILE_PATH"

ios-deploy -t 60 --noinstall $TARGET_DEVICE -b "$IOS_APP_PATH" --noninteractive --args "--substitute-dir $TEST_BASE_DIR $*" | sed $'s/\r$//' | tee -a "$LOG_FILE_PATH" | sed '1,/(lldb) autoexit/d' | sed -E '/Process [0-9]+ exited with status.*|PROCESS_EXITED/,$d'
ios-deploy -t 120 --noinstall $TARGET_DEVICE -b "$IOS_APP_PATH" --noninteractive --args "--substitute-dir $TEST_BASE_DIR $*" | sed $'s/\r$//' | tee -a "$LOG_FILE_PATH" | sed '1,/(lldb) autoexit/d' | sed -E '/Process [0-9]+ exited with status.*|PROCESS_EXITED/,$d'

exit ${PIPESTATUS[0]}

0 comments on commit a7eb45d

Please sign in to comment.