v8

How to debug remote v8-based application using Chrome Dev Tools

删除回忆录丶 提交于 2019-12-05 13:14:35
v8 has its own JSON based remote-debugging protocol and two UI debuggers:console application D8 and a eclipse plugin(hosted at http://code.google.com/p/chromedevtools ) Chrome use WebKit Remote Debugging Protocol including Console, DOM Debugger, ..., Debugger "WebKit Remote Debugging Protocol" is a Google Chrome/Chromium debug protocol. You will find its description at http://developers.google.com/chrome-developer-tools/docs/remote-debugging So is it possible to use the Chrome Dev Tools ships with chrome to debug remote v8-based application? Try Node Webkit Agent for NodeJS version >= 0.6 Node

关于编译多目标平台abi的控制的随笔记录

若如初见. 提交于 2019-12-05 12:17:14
仅限于DEBUG包 关于编译多目标平台abi的控制注意事项 即编译出"armeabi-v7a", "arm64-v8a"的控制。 对应用控制 ndk的abi类型有助于较少apk的包体大小 最终输出的平台类型数量与最终执行编译命令的工程gradle配置有关 假设 某lib配置了 ndk { abiFilters "armeabi-v7a", "arm64-v8a" } 当触发lib的编译操作时 则会在该lib的buidl/intermediates中输出 "armeabi-v7a"和"arm64-v8a"的对应文件 如主app模块配置为 ndk { abiFilters "armeabi-v7a" } 则app和lib模块均只产生 "armeabi-v7a"的目录和文件 总结: 以触发编译时的模块为准 来源: oschina 链接: https://my.oschina.net/u/1446823/blog/3137366

关于编译多目标平台abi的控制的随笔记录

爱⌒轻易说出口 提交于 2019-12-05 12:03:23
仅限于DEBUG包 关于编译多目标平台abi的控制注意事项 即编译出"armeabi-v7a", "arm64-v8a"的控制。 对应用控制 ndk的abi类型有助于较少apk的包体大小 最终输出的平台类型数量与最终执行编译命令的工程gradle配置有关 假设 某lib配置了 ndk { abiFilters "armeabi-v7a", "arm64-v8a" } 当触发lib的编译操作时 则会在该lib的buidl/intermediates中输出 "armeabi-v7a"和"arm64-v8a"的对应文件 如主app模块配置为 ndk { abiFilters "armeabi-v7a" } 则app和lib模块均只产生 "armeabi-v7a"的目录和文件 总结: 以触发编译时的模块为准 来源: oschina 链接: https://my.oschina.net/u/1446823/blog/3137366

控制引入的so文件在debug编译时输出目标平台ABI类型(arm-v7a,arm64-v8a)

北城余情 提交于 2019-12-05 11:52:54
控制引入的so文件在debug编译时输出目标平台ABI类型(arm-v7a,arm64-v8a) buildTypes { debug { jniDebuggable false ndk { abiFilters "armeabi-v7a", "arm64-v8a" } } release { minifyEnabled false ndk { abiFilters "armeabi-v7a", "arm64-v8a" } } } 来源: oschina 链接: https://my.oschina.net/u/1446823/blog/3137352

《Node.js》之事件处理机制以及事件环机制(二)

早过忘川 提交于 2019-12-05 11:47:49
传统服务器与Node.js的比较 传统的服务器在面临高并发的场景时,会使用多线程方案,服务器会为客户端的请求分配一个线程,使用同步的I/O,系统通过线程切换来弥补同步I/O调用过程中的时间开销。Apache就是使用的这种方式,由于I/O操作会消耗比较多的时间,通过多线程的方式解决高并发的问题,难以实现高性能,但是可以实现很复杂的逻辑。 但是大多数网站的服务端不需要太多的计算处理,收到请求之后交给其他的服务进行处理,将处理结果返回给客户端。因此Node.js会针对这样的应用场景使用单线程模型进行处理,并不会为每一个客户端的请求创建一个线程,而是通过一个线程处理所有的请求,然后对I/O操作进行异步处理,这样的方式可以减少创建、销毁线程以及线程切换消耗的时间。 Node.js的事件处理机制 在Node.js中采用了非阻塞的I/O机制,在这种机制下应用程序所进行的处理都不会再结束之前阻碍其他处理的进行。这些处理都是相互独立的,每一个事件处理完成之后,会执行一个回调函数。 Node.js在主线程里面维护了一个事件队列,当接到请求之后就会将请求作为一个事件放在这个事件队列中,然后继续接受其他的请求。当主线程空闲的时候就开始循环事件队列。检查队列中是否有需要处理的事件,如果需要处理的事件不是I/O任务,就亲自处理,通过回调函数返回到上层调用。如果是I/O任务

控制引入的so文件在debug编译时输出目标平台ABI类型(arm-v7a,arm64-v8a)

让人想犯罪 __ 提交于 2019-12-05 11:40:20
控制引入的so文件在debug编译时输出目标平台ABI类型(arm-v7a,arm64-v8a) buildTypes { debug { jniDebuggable false ndk { abiFilters "armeabi-v7a", "arm64-v8a" } } release { minifyEnabled false ndk { abiFilters "armeabi-v7a", "arm64-v8a" } } } 来源: oschina 链接: https://my.oschina.net/u/1446823/blog/3137352

Analyzing an ELF binary to minimize its size

两盒软妹~` 提交于 2019-12-05 10:43:11
I'm cross-compiling a V8 project to an embedded ARM target using the GCC arm-gnueabi cross compiler. I got the V8 library itself cross-compiled successfully, and as a smoke test I wanted to link it to Google's hello world example and run it on the ARM board. The libraries themselves clock in at a bit over 1.2 MB: v8 % find out/arm.release/obj.target/ -name '*.a' -exec du -h {} + 1.2M out/arm.release/obj.target/tools/gyp/libv8_base.a 12K out/arm.release/obj.target/tools/gyp/libv8_libbase.a 4.0K out/arm.release/obj.target/tools/gyp/libv8_libplatform.a 4.0K out/arm.release/obj.target/tools/gyp

Add a function template to a global object prototype in v8

假装没事ソ 提交于 2019-12-05 10:42:35
In V8, I would like to modify the prototype of the global built-in Array object, by adding some functions to it. In JavaScript, I would do it like this, for example: Array.prototype.sum = function() { // calculate sum of array values }; How can I achieve the same result in C++? I have some global function templates added to the global ObjectTemplate, but I am not sure how to do the same for a supposedly existing native object prototype. native implementation: Handle<Value> native_example(const Arguments& a) { return String::New("it works"); } assignment to prototype (notice we need a prototype

A puzzle about this/@ in Javascript/Coffeescript

点点圈 提交于 2019-12-05 10:23:46
I'm working through Trevor Burnham's CoffeeScript book and I've run into a weird puzzle concerning this / @ . The puzzle has a few parts (and I may be just very confused), so I'll try to make this as clear as I can. The main problem I'm having is that I get varied and inconsistent results running the same code through different REPLs and interpreters. I'm testing with (1) the coffee REPL and interpreter, (2) Node's REPL and interpreter and (3) v8's REPL and interpreter. Here's the code, first as Coffeescript then as Javascript: // coffeescript setName = (name) -> @name = name setName 'Lulu'

Embedding v8 with Visual C++ 2010

南楼画角 提交于 2019-12-05 08:45:56
I'm trying to embed the v8 engine to my C++ application. I use Visual C++ 2010. I've built it successfully using this command: scons env="INCLUDE:C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include;C:\Program Files\Microsoft Visual Studio 10.0\VC\include,LIB:C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib;C:\Program Files\Microsoft Visual Studio 9.0\VC\lib" And then, I: added the v8/include directory to Configuration Properties -> C/C++ -> General --> Additional Include Directories added the v8/v8.lib file to Configuration Properties -> Linker -> Input -> Additional Dependencies. When I