プロジェクト

全般

プロフィール

機能 #4176

omniidl shortcutの利用

n-miyamoto6年以上前に追加. 5年以上前に更新.

ステータス:
終了
優先度:
通常
担当者:
対象バージョン:
-
開始日:
2017/09/04
期日:
進捗率:

100%

予定工数:

説明

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

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

関係しているリビジョン

リビジョン 3037 (差分)
miyamoto6年以上前に追加

[incompat] refs #4176

リビジョン 3037 (差分)
miyamoto6年以上前に追加

[incompat] refs #4176

リビジョン 3038 (差分)
miyamoto6年以上前に追加

[incompat] refs #4176

リビジョン 3038 (差分)
miyamoto6年以上前に追加

[incompat] refs #4176

リビジョン 3107 (差分)
n-ando6年以上前に追加

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

リビジョン 3107 (差分)
n-ando6年以上前に追加

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

履歴

#1 n-miyamoto6年以上前に更新

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 n-miyamoto6年以上前に更新

  • ステータス担当 から 解決 に変更
  • 進捗率80 から 100 に変更

#3 n-miyamoto5年以上前に更新

  • ステータス解決 から 終了 に変更

他の形式にエクスポート: Atom PDF