Commit Graph

59 Commits

Author SHA1 Message Date
Tadeu Zagallo 63015b911c Explicitly cast the trampoline prototype to IMP
Summary: public

Add explicitly cast to the trampoline prototype to silence warnings.

Reviewed By: javache

Differential Revision: D2605779

fb-gh-sync-id: e208b69236c1b87bb1374ee493840ea5f47b371c
2015-11-02 10:51:48 -08:00
Tadeu Zagallo ccd90e25c1 Convert remaining uses of alloc] init] to new]
Summary: public

We moved to using `new` instead of `alloc] init` but there was still some calls
left.

Reviewed By: javache

Differential Revision: D2604679

fb-gh-sync-id: ff7300ecbedb55dd5e93873592598810c9b87808
2015-11-02 08:03:17 -08:00
Tadeu Zagallo 287e0e3c49 Add RCTPerformanceLogger data to PerfMonitor
Summary: public

Add information the times recorded by RCTPerformanceLogger to RCTPerfMonitor,
tap the monitor to show a table view with the data.

Reviewed By: jspahrsummers

Differential Revision: D2595372

fb-gh-sync-id: dc3b73af71b6d7f258e4e5991116bbc6cedc21fb
2015-10-30 16:57:30 -07:00
Tadeu Zagallo 010380cca6 Fix CPU profiler upload
Summary: public

Changes were made on the packager that broke the CPU profile upload route,
fix it.

Reviewed By: martinbigio

Differential Revision: D2585184

fb-gh-sync-id: 206744f92d403d6851a69891dfac0c4c11bf1b7e
2015-10-30 14:46:00 -07:00
Tadeu Zagallo 8185b203be Preserve xmm registers on x86_64
Summary: public

`%xmm` registers weren't being preserved what would cause eventual weird issues
for methods using floats / doubles / etc.

Reviewed By: jspahrsummers

Differential Revision: D2581358

fb-gh-sync-id: 701498def0f05716c665f4749e5154b828bf41ec
2015-10-28 05:35:25 -07:00
Tadeu Zagallo 0f92639a96 Prevent RCTProfileTrampoline from getting stripped
Summary: public

I was using `dlsym` as a more elegant way of checking if the function was defined
to prevent crashes if running on an unsupported architecture, but Xcode might
strip the symbol, even with `.no_dead_strip`, if there's no references to the
compilation unit at all.

Replace it with an ugly `#if` that checks if it's any of the supported targets
and extern the function prototype.

Reviewed By: jspahrsummers

Differential Revision: D2581143

fb-gh-sync-id: b004ed351de97f96c04b4a6c914ce55cfcbbbcbb
2015-10-27 13:03:28 -07:00
Tadeu Zagallo a044ade333 Update button and add comments to Perf Monitor
Summary: public

Rename the dev menu button and add comments to the private method
used.

Reviewed By: ndfred

Differential Revision: D2576599

fb-gh-sync-id: cd5cde7562dcbc243663ac68d2b9cac5c0a984ab
2015-10-24 14:03:27 -07:00
Tadeu Zagallo 9069bdf1c2 Introduce Perf Monitor
Summary: public

Kill `RCTPerfStats` and introduce the new `RCTPerfMonitor`, including memory
usage, JSC heap size, number of RN views in screen, FPS (both on UI and JS threads)
and more to come.

It removes all the previous traces that were previous spread across the bridge
and the dev menu and moves everything to be more contained, so the whole thing
can be safely striped in production.

Reviewed By: nicklockwood

Differential Revision: D2575158

fb-gh-sync-id: 6a6d0c4422adbddeeefddd32ec3409a7095ff2a9
2015-10-23 10:56:56 -07:00
Tadeu Zagallo 89c1747c33 Implement asm trampoline rather forwardInvocation
Summary: public

The profiler overrides all the methods of all the BridgeModules, and in order to
`start` and `end` the profiler at the function invocation time it used `NSInvocation`,
which is slow.

Replace it with a simple assembly method based on `objc_msgSend`.

Reviewed By: jspahrsummers

Differential Revision: D2550807

fb-gh-sync-id: 88ca08f9d6bfcd3035bda9304c93566c8818b46f
2015-10-20 04:14:09 -07:00