Project

General

Profile

機能 #4176

omniidl shortcutの利用

Added by n-miyamoto about 4 years ago. Updated about 3 years ago.

Status:
終了
Priority:
通常
Assignee:
Target version:
-
Start date:
09/04/2017
Due date:
% Done:

100%

Estimated time:

Description

IDLコンパイラ実行時に-Wbshortcutオプションを追加することで関数を直接呼び出せるようにする。
サンプルを見たところLOCAL_CALLS_SHORTCUTのポリシーを設定したPOAを使用する必要があるようなので、新たに子POAを生成する。

vx_test.png (14 KB) vx_test.png n-miyamoto, 09/04/2017 05:53 PM
result_direct_vx.txt (722 KB) result_direct_vx.txt n-miyamoto, 09/04/2017 05:54 PM
result_shortcut_vx.txt (792 KB) result_shortcut_vx.txt n-miyamoto, 09/04/2017 05:54 PM
result_cdr_vx.txt (666 KB) result_cdr_vx.txt n-miyamoto, 09/04/2017 05:54 PM
result_cdr_ubuntu.txt (806 KB) result_cdr_ubuntu.txt n-miyamoto, 09/04/2017 05:55 PM
result_direct_ubuntu.txt (779 KB) result_direct_ubuntu.txt n-miyamoto, 09/04/2017 05:55 PM
result_shortcut_ubuntu.txt (779 KB) result_shortcut_ubuntu.txt n-miyamoto, 09/04/2017 05:55 PM
2552

Associated revisions

Revision 3037 (diff)
Added by miyamoto about 4 years ago

[incompat] refs #4176

Revision 3037 (diff)
Added by miyamoto about 4 years ago

[incompat] refs #4176

Revision 3038 (diff)
Added by miyamoto about 4 years ago

[incompat] refs #4176

Revision 3038 (diff)
Added by miyamoto about 4 years ago

[incompat] refs #4176

Revision 3107 (diff)
Added by n-ando almost 4 years ago

merged changed from trunk/OpenRTM-aist r3037, 3042-3048, 3089 during 2017-09:
[incompat,->RELENG_1_2] omniORB's shortcut POA is applied to data ports. refs #4176
[incompat,->RELENG_1_2] omniORB's shortcut POA is applied to data ports. refs #4176
[compat,->RELENG_1_2] Analyzer sample has been added in windows source package. refs #4202
[compat,bugfix,->RELENG_1_2] The header setting of the Visual Studio solution file has been fixed. refs #4201 and #4172
[compat,->RELENG_1_2] vc2017 version has been changed from vc15 to vc141. refs #4172
[compat,->RELENG_1_2] vc2017 version has been changed from vc15 to vc141. refs #4172
[compat,rtc.conf,->RELENG_1_2] A bug in preconnection option parser, which crash when ConnectorProfiles are not given or invalid format, fixed.
[compat,->RELENG_1_2] When executing cmake, it is not influenced by the system environment variable. refs #4171
[compat,example,->RELENG_1_2] Throughput measurement component example added.
[incompat,->RELENG_1_2] Extension module header files have been added to rpm package. refs #4368

Revision 3107 (diff)
Added by n-ando almost 4 years ago

merged changed from trunk/OpenRTM-aist r3037, 3042-3048, 3089 during 2017-09:
[incompat,->RELENG_1_2] omniORB's shortcut POA is applied to data ports. refs #4176
[incompat,->RELENG_1_2] omniORB's shortcut POA is applied to data ports. refs #4176
[compat,->RELENG_1_2] Analyzer sample has been added in windows source package. refs #4202
[compat,bugfix,->RELENG_1_2] The header setting of the Visual Studio solution file has been fixed. refs #4201 and #4172
[compat,->RELENG_1_2] vc2017 version has been changed from vc15 to vc141. refs #4172
[compat,->RELENG_1_2] vc2017 version has been changed from vc15 to vc141. refs #4172
[compat,rtc.conf,->RELENG_1_2] A bug in preconnection option parser, which crash when ConnectorProfiles are not given or invalid format, fixed.
[compat,->RELENG_1_2] When executing cmake, it is not influenced by the system environment variable. refs #4171
[compat,example,->RELENG_1_2] Throughput measurement component example added.
[incompat,->RELENG_1_2] Extension module header files have been added to rpm package. refs #4368

History

#1 Updated by n-miyamoto about 4 years ago

2552
  • 修正内容

ShortCutポリシーを設定したPOA取得用にManagerにtheShortCutPOA関数、getShortCutPOA関数を追加しました。

また、ManagerのinitORB関数内にPOAの生成を追加しました

#ifdef ORB_IS_OMNIORB
    CORBA::PolicyList pl;
    pl.length(1);
#ifdef RTM_OMNIORB_42
    pl[0] = omniPolicy::create_local_shortcut_policy(omniPolicy::LOCAL_CALLS_SHORTCUT);
#else
    CORBA::Any v;
    v <<= omniPolicy::LOCAL_CALLS_SHORTCUT;
    pl[0] = m_pORB->create_policy(omniPolicy::LOCAL_SHORTCUT_POLICY_TYPE, v);
#endif
    m_pShortCutPOA = m_pPOA->create_POA("shortcut", m_pPOAManager, pl);
#endif

InPortCorbaCdrProvider、OutPortCorbaCdrProviderをshortcut用POAでアクティブ化するようにコードを追加した。

#ifdef ORB_IS_OMNIORB
    ::RTC::Manager::instance().theShortCutPOA()->activate_object(this);
#endif

CMakeLists.txt内でomniid実行時に-Wbshortcutオプションを追加するように変更しました。

SET(IDLCOMMAND_FLAGS -bcxx -Wba -nf -Wbshortcut)
  • 実験(Ubuntu)
    Ubuntu上で10[B]のデータを10万回通信して比較を行いました。
通信方式 平均[ms]
corba_cdr(POA経由) 0.102864
corba_cdr(shortcut) 0.0822503
direct 0.0818192

見ての通り0.02[ms]程度しか差がないため、データポートが100個通信するとかいう状況でもないと意味はなさそうです。

  • 実験(VxWorks)
    VxWorks上で同様の実験を行った場合以下のようになります。
通信方式 平均[ms]
corba_cdr(POA経由) 0.12463
corba_cdr(shortcut) 0.099306
direct 0.154659

何故directの方がcorba_cdrよりも遅いのかは謎ですが、グラフからも転送速度はshortcut>corba_cdrなのは間違いないようです。

#2 Updated by n-miyamoto almost 4 years ago

  • Status changed from 担当 to 解決
  • % Done changed from 80 to 100

#3 Updated by n-miyamoto about 3 years ago

  • Status changed from 解決 to 終了

Also available in: Atom PDF