Skip to content

[TIMOB-12200] Provide profiler data via communication channel #3910

Merged
merged 5 commits into from Mar 8, 2013

3 participants

@joshthecoder joshthecoder was assigned Feb 27, 2013
@mstepanov

Please CR/FR, but hold merge until special instruction from Neeraj/Ingo.
Merging https://github.com/appcelerator/titanium_profiler/issues/2 is fine since it's private repo.

@joshthecoder joshthecoder commented on the diff Mar 4, 2013
android/runtime/v8/src/native/V8Runtime.cpp
@@ -150,6 +150,10 @@ static void dispatchHandler()
*/
JNIEXPORT void JNICALL Java_org_appcelerator_kroll_runtime_v8_V8Runtime_nativeInit(JNIEnv *env, jobject self, jboolean useGlobalRefs, jint debuggerPort, jboolean DBG)
{
+ char* argv[] = { "", "--expose-gc" };
+ int argc = sizeof(argv)/sizeof(*argv);
+ V8::SetFlagsFromCommandLine(&argc, argv, false);
@joshthecoder
joshthecoder added a note Mar 4, 2013

Why do we expose GC?

Also using SetFlagsFromString() would probably be easier. Not sure why you are computing argc that way.

@mstepanov
mstepanov added a note Mar 4, 2013

I could either way.
About argc computing - I hate constants. But sizeof(argv)/sizeof(*argv) has a compile time value of 2.

@joshthecoder
joshthecoder added a note Mar 4, 2013

Okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@joshthecoder

CR :+1:

@ayeung
ayeung commented Mar 5, 2013

FR looks good. Request Accepted.

@ayeung
ayeung commented Mar 6, 2013

Please resolve https://jira.appcelerator.org/browse/TIMOB-12199 when this PR is merged.

@ayeung ayeung merged commit 88417ac into appcelerator:master Mar 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.