{"action":"created","issue":{"url":"https://api.github.com/repos/PX4/Firmware/issues/1660","labels_url":"https://api.github.com/repos/PX4/Firmware/issues/1660/labels{/name}","comments_url":"https://api.github.com/repos/PX4/Firmware/issues/1660/comments","events_url":"https://api.github.com/repos/PX4/Firmware/issues/1660/events","html_url":"https://github.com/PX4/Firmware/pull/1660","id":54681895,"number":1660,"title":"Global performance improvements","user":{"login":"pavel-kirienko","id":3298404,"avatar_url":"https://avatars.githubusercontent.com/u/3298404?v=3","gravatar_id":"","url":"https://api.github.com/users/pavel-kirienko","html_url":"https://github.com/pavel-kirienko","followers_url":"https://api.github.com/users/pavel-kirienko/followers","following_url":"https://api.github.com/users/pavel-kirienko/following{/other_user}","gists_url":"https://api.github.com/users/pavel-kirienko/gists{/gist_id}","starred_url":"https://api.github.com/users/pavel-kirienko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavel-kirienko/subscriptions","organizations_url":"https://api.github.com/users/pavel-kirienko/orgs","repos_url":"https://api.github.com/users/pavel-kirienko/repos","events_url":"https://api.github.com/users/pavel-kirienko/events{/privacy}","received_events_url":"https://api.github.com/users/pavel-kirienko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2015-01-18T01:02:21Z","updated_at":"2015-01-21T20:40:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/PX4/Firmware/pulls/1660","html_url":"https://github.com/PX4/Firmware/pull/1660","diff_url":"https://github.com/PX4/Firmware/pull/1660.diff","patch_url":"https://github.com/PX4/Firmware/pull/1660.patch"},"body":"DO NOT MERGE\r\n\r\nThis is still WIP. Changes:\r\n\r\n- Debug/Nuttx.py:\r\n  - Now it works on GDB 7.6 with Python 2.7 ([from Terry Guo et al](https://launchpad.net/gcc-arm-embedded)).\r\n  - Output format of `show mybt` changed to match GDB's bt default format.\r\n  - `show mybt` still can't unwind the call stack correctly though - it was broken and it remains this way.\r\n- Added a simple sampling profiler Debug/poor-mans-profiler.sh.\r\n- Stack overflow checks via `__cyg_profile_func*()` are disabled by default, per @LorenzMeier's suggestion. They can be enabled back by setting `ENABLE_STACK_CHECKS=1`, e.g. `make ENABLE_STACK_CHECKS=1`.\r\n- Enabled extended debug information generation: `-g` replaced with `-g3`. This is not necessary, but it helped me with profiling and it doesn't affect the final binary, so it should be safe to keep.\r\n- Changes to the uavcan module (see https://github.com/PX4/Firmware/issues/1417 for details):\r\n  - More perfcounters\r\n  - Stack overflow checks are always disabled, regardless of `ENABLE_STACK_CHECKS`\r\n  - `-O3` instead of `-Os`\r\n\r\nOne thing left to fix: the current head of this branch crashes occasionally (50/50) shortly *after* boot:\r\n\r\n```\r\nuavcan: subscribe to actuator_controls_0\r\nnavigator: Initializing..\r\nmavlink_if0: DISABLING HARDWARE FLOW CONTROL\r\n[i] Addons script: /fs/microsd/etc/extras.txt \r\n\r\nNuttShell (NSH)\r\nnsh> navigator: Could not clear geofence\r\nnavigator: offboard mission updated: dataman_id=0, count=0, current_seq=0\r\nAssertion failed at file:armv7-m/up_hardfault.c line: 184 task: uavcan\r\nsp:     20009264\r\nIRQ stack:\r\n  base: 200092d0\r\n  size: 00000ffc\r\n20009260: 200139ac 20009264 20013af0 200092d0 08078931 000000b8 080a9fd8 200139ac\r\n20009280: 08078b61 08086645 08078a01 00000010 08078c05 08078be9 08089751 200065e4\r\n200092a0: 00000003 200139ac 08086671 00000000 20015930 20011a10 00000008 20011a10\r\n200092c0: 20011938 00000001 08078b61 200139ac 00000000 10000010 00000001 00000000\r\nsp:     20013a80\r\nUser stack:\r\n  base: 20013af0\r\n  size: 00001384\r\n20013a80: 00000000 00000000 00000000 00000000 08059b6d 20015930 00000000 08059a17\r\n20013aa0: 080599f5 2000da60 00000004 20011570 20011a08 0805b433 2000da60 0001209c\r\n20013ac0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0805b58b\r\n20013ae0: 0805b581 0807150d 00000000 00000000 ffffffff 198aed12 00000040 80001390\r\nR0: 00000000 20011a10 00000000 63696d2f 20015930 20011a10 00000008 20011a10\r\nR8: 20011938 00000001 200127b0 20011874 00000000 20013a80 08059861 08059c5e\r\nxPSR: 61000000 BASEPRI: 00000000 CONTROL: 00000000\r\nEXC_RETURN: ffffffe9\r\n```\r\n\r\nLR: modules/systemlib/mixer/mixer.cpp:73  \r\nPC: modules/systemlib/mixer/mixer_multirotor.cpp:217\r\n\r\nBisecting through the history, I found that the breaking commits are aa36686e765b11da040a536326aa8977ffd87d81 and 530988dfd1997f09c2deb61890859aa8d4399114 (the former introduced another bug that was fixed in the latter), so the change that broke the module was adding `-fno-instrument-functions` to the uavcan module.\r\n\r\nI'm currently half asleep and am likely missing something obvious here - I'll continue tomorrow. Meanwhile, any pointers or comments would be appreciated."},"comment":{"url":"https://api.github.com/repos/PX4/Firmware/issues/comments/70917171","html_url":"https://github.com/PX4/Firmware/pull/1660#issuecomment-70917171","issue_url":"https://api.github.com/repos/PX4/Firmware/issues/1660","id":70917171,"user":{"login":"LorenzMeier","id":1208119,"avatar_url":"https://avatars.githubusercontent.com/u/1208119?v=3","gravatar_id":"","url":"https://api.github.com/users/LorenzMeier","html_url":"https://github.com/LorenzMeier","followers_url":"https://api.github.com/users/LorenzMeier/followers","following_url":"https://api.github.com/users/LorenzMeier/following{/other_user}","gists_url":"https://api.github.com/users/LorenzMeier/gists{/gist_id}","starred_url":"https://api.github.com/users/LorenzMeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LorenzMeier/subscriptions","organizations_url":"https://api.github.com/users/LorenzMeier/orgs","repos_url":"https://api.github.com/users/LorenzMeier/repos","events_url":"https://api.github.com/users/LorenzMeier/events{/privacy}","received_events_url":"https://api.github.com/users/LorenzMeier/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T20:40:55Z","updated_at":"2015-01-21T20:40:55Z","body":"@davids5 @pavel-kirienko Will do one last test round here, then merge."}}