On 13 December 2017 at 15:38, Mathieu Poirier mathieu.poirier@linaro.org wrote:
On 13 December 2017 at 05:27, Mike Leach mike.leach@linaro.org wrote:
Hi Mathieu,
On 12 December 2017 at 17:09, Mathieu Poirier mathieu.poirier@linaro.org wrote:
On 12 December 2017 at 05:54, Mike Leach mike.leach@linaro.org wrote:
Hi Mathieu,
V2 is largely fine - the install fails as it is still tied to the library name. However I've fixed that and implemented a patch (attached) that limits the installed header file set to those necessary and sufficient for compiling against the C-API library - as per your orginal patch set - as I liked the idea of limiting those files exposed to user space. This list is maintained in the c-api library makefile. If we chose to install a full set of headers for the C++ API at a later date then we can do that in the c++ library makefile.
I think the problem was related to this line:
UAPI_INCLUDE=$(OCSD_INCLUDE)/$(LIB_BASE_NAME)
Which you properly fixed with:
+export LIB_UAPI_INC_DIR=opencsd
Can you check that what the patch installs is actually sufficient to build perf in your updated environment - I would assume it is as the list of files is generated from those moved in the v1 of your install patch.
Things compile properly on my side.
I'll work on getting the windows build files up to speed, and after Wednesday once we decide on the library naming convention, I'll re-jig anything needed and release the lot as a 0.8.0 version of the library as it will effectively break any users who build apps relying on the original directory structures.
Good idea to bump it to 0.8.0.
I pushed my work to [1], that way you can try out the whole solution on your side. When compiling the perf tools watch out for the libopencsd status as displayed on line 21 here [2]. If something is wrong it will be marked as 'off'. When things go wrong and you don't know why look at the content of tools/build/feature/test-libopencsd.make.output. Usually it can't find the header files for the libraries. Since we are mucking with the library names you will typically have to change names the script is linking with as in [3].
[1]. https://git.linaro.org/people/mathieu.poirier/coresight.git (perf-opencsd-perf-tools-v4.15-rc1-RFC) [2]. https://pastebin.com/AkWyAayD [3]. https://pastebin.com/WNJdEHsw
That all works once I provide a test-libopencsd.c source file. So once we decide on the final library name we have a good solution.
I know... I noticed that after I sent the email.
One further question - the old way of building against the libcstrace libraries, using the environment variable, allowed me to a) redirect the library link path to the debug build version of the library. b) when cross compiling redirect the library path to the arm architecture builds of the library.
Agreed, it has advantages that can't be ignored.
Actually a) is solved by 'sudo make DEBUG=1 install', which will install the debug versions on x86, thus automatically using them. b) is less important. for me at least, as at present I mainly decode data off target.
Mike
Is there a way of doing something similar in the "standard" perf build structure?
I think so. I was working on that earlier this week but decided to abandon the idea as it is not mandatory for a first RFC and there is still a fair amount of work to do. Once it is out there revisions will likely follow, giving me a time to fix this. Worse case scenario is that we add it during a subsequent patchset.
Regards
Mike
Regards
Mike
On 11 December 2017 at 20:39, Mathieu Poirier mathieu.poirier@linaro.org wrote:
Hi,
This is the second revision and as per your request I moved the all of the files in etmv3/etmv4/ptm/stm to opencsd/. I also rebased everything to the master branch so things should apply cleanly on your side.
I didn't touch the Visual Studio supports file as I can't test them and I left out the patch that rename the library. That one can be sent separately after Wednesday's meeting.
Thanks, Mathieu
Changes for V2:
- More header file movement.
- Rebased to master.
- Left out patch that rename the library.
Mathieu Poirier (2): opencsd: Creating user API include directory opencsd: Adding "install" target
decoder/build/linux/makefile | 17 +++++++++++++++++ decoder/include/common/comp_attach_pt_t.h | 2 +- decoder/include/common/ocsd_code_follower.h | 4 ++-- decoder/include/common/ocsd_dcd_mngr.h | 2 +- decoder/include/common/ocsd_dcd_mngr_i.h | 2 +- decoder/include/common/ocsd_error.h | 2 +- decoder/include/common/ocsd_lib_dcd_register.h | 2 +- decoder/include/common/ocsd_pe_context.h | 2 +- decoder/include/common/trc_core_arch_map.h | 2 +- decoder/include/common/trc_frame_deformatter.h | 2 +- decoder/include/common/trc_gen_elem.h | 2 +- decoder/include/common/trc_ret_stack.h | 2 +- decoder/include/i_dec/trc_i_decode.h | 2 +- decoder/include/i_dec/trc_idec_arminst.h | 2 +- decoder/include/interfaces/trc_data_raw_in_i.h | 2 +- decoder/include/interfaces/trc_data_rawframe_in_i.h | 2 +- decoder/include/interfaces/trc_error_log_i.h | 2 +- decoder/include/interfaces/trc_indexer_src_i.h | 2 +- decoder/include/mem_acc/trc_mem_acc_base.h | 2 +- decoder/include/mem_acc/trc_mem_acc_cb_if.h | 2 +- decoder/include/mem_acc/trc_mem_acc_file.h | 2 +- decoder/include/mem_acc/trc_mem_acc_mapper.h | 2 +- decoder/include/opencsd.h | 14 +++++++------- .../include/{ => opencsd}/c_api/ocsd_c_api_cust_fact.h | 0 .../include/{ => opencsd}/c_api/ocsd_c_api_cust_impl.h | 4 ++-- decoder/include/{ => opencsd}/c_api/ocsd_c_api_custom.h | 0 decoder/include/{ => opencsd}/c_api/ocsd_c_api_types.h | 14 +++++++------- decoder/include/{ => opencsd}/c_api/opencsd_c_api.h | 0 decoder/include/{ => opencsd}/etmv3/etmv3_decoder.h | 10 +++++----- decoder/include/{ => opencsd}/etmv3/trc_cmp_cfg_etmv3.h | 0 .../include/{ => opencsd}/etmv3/trc_dcd_mngr_etmv3.h | 0 .../include/{ => opencsd}/etmv3/trc_pkt_decode_etmv3.h | 4 ++-- .../include/{ => opencsd}/etmv3/trc_pkt_elem_etmv3.h | 0 .../include/{ => opencsd}/etmv3/trc_pkt_proc_etmv3.h | 0 .../include/{ => opencsd}/etmv3/trc_pkt_types_etmv3.h | 2 +- decoder/include/{ => opencsd}/etmv4/etmv4_decoder.h | 0 decoder/include/{ => opencsd}/etmv4/trc_cmp_cfg_etmv4.h | 0 .../include/{ => opencsd}/etmv4/trc_dcd_mngr_etmv4i.h | 0 .../include/{ => opencsd}/etmv4/trc_etmv4_stack_elem.h | 2 +- .../include/{ => opencsd}/etmv4/trc_pkt_decode_etmv4i.h | 6 +++--- .../include/{ => opencsd}/etmv4/trc_pkt_elem_etmv4d.h | 0 .../include/{ => opencsd}/etmv4/trc_pkt_elem_etmv4i.h | 0 .../include/{ => opencsd}/etmv4/trc_pkt_proc_etmv4.h | 0 .../include/{ => opencsd}/etmv4/trc_pkt_types_etmv4.h | 2 +- decoder/include/{ => opencsd}/ocsd_if_types.h | 4 ++-- decoder/include/{ => opencsd}/ptm/ptm_decoder.h | 0 decoder/include/{ => opencsd}/ptm/trc_cmp_cfg_ptm.h | 0 decoder/include/{ => opencsd}/ptm/trc_dcd_mngr_ptm.h | 0 decoder/include/{ => opencsd}/ptm/trc_pkt_decode_ptm.h | 4 ++-- decoder/include/{ => opencsd}/ptm/trc_pkt_elem_ptm.h | 0 decoder/include/{ => opencsd}/ptm/trc_pkt_proc_ptm.h | 0 decoder/include/{ => opencsd}/ptm/trc_pkt_types_ptm.h | 2 +- decoder/include/{ => opencsd}/stm/stm_decoder.h | 0 decoder/include/{ => opencsd}/stm/trc_cmp_cfg_stm.h | 0 decoder/include/{ => opencsd}/stm/trc_dcd_mngr_stm.h | 0 decoder/include/{ => opencsd}/stm/trc_pkt_decode_stm.h | 4 ++-- decoder/include/{ => opencsd}/stm/trc_pkt_elem_stm.h | 0 decoder/include/{ => opencsd}/stm/trc_pkt_proc_stm.h | 0 decoder/include/{ => opencsd}/stm/trc_pkt_types_stm.h | 2 +- decoder/include/{ => opencsd}/trc_gen_elem_types.h | 6 +++--- decoder/include/{ => opencsd}/trc_pkt_types.h | 6 +++--- decoder/source/c_api/ocsd_c_api.cpp | 2 +- decoder/source/c_api/ocsd_c_api_custom_obj.cpp | 2 +- decoder/source/c_api/ocsd_c_api_custom_obj.h | 2 +- decoder/source/c_api/ocsd_c_api_obj.h | 2 +- decoder/source/etmv3/trc_cmp_cfg_etmv3.cpp | 2 +- decoder/source/etmv3/trc_pkt_decode_etmv3.cpp | 2 +- decoder/source/etmv3/trc_pkt_elem_etmv3.cpp | 2 +- decoder/source/etmv3/trc_pkt_proc_etmv3.cpp | 2 +- decoder/source/etmv3/trc_pkt_proc_etmv3_impl.h | 6 +++--- decoder/source/etmv4/trc_cmp_cfg_etmv4.cpp | 2 +- decoder/source/etmv4/trc_etmv4_stack_elem.cpp | 2 +- decoder/source/etmv4/trc_pkt_decode_etmv4i.cpp | 2 +- decoder/source/etmv4/trc_pkt_elem_etmv4d.cpp | 2 +- decoder/source/etmv4/trc_pkt_elem_etmv4i.cpp | 2 +- decoder/source/etmv4/trc_pkt_proc_etmv4.cpp | 2 +- decoder/source/etmv4/trc_pkt_proc_etmv4i_impl.h | 6 +++--- decoder/source/i_dec/trc_i_decode.cpp | 2 +- decoder/source/ocsd_lib_dcd_register.cpp | 8 ++++---- decoder/source/ptm/trc_cmp_cfg_ptm.cpp | 2 +- decoder/source/ptm/trc_pkt_decode_ptm.cpp | 2 +- decoder/source/ptm/trc_pkt_elem_ptm.cpp | 2 +- decoder/source/ptm/trc_pkt_proc_ptm.cpp | 4 ++-- decoder/source/stm/trc_pkt_decode_stm.cpp | 2 +- decoder/source/stm/trc_pkt_elem_stm.cpp | 2 +- decoder/source/stm/trc_pkt_proc_stm.cpp | 2 +- decoder/source/trc_frame_deformatter_impl.h | 2 +- .../ext_dcd_test_eg/c_api_echo_test/ext_dcd_echo_test.c | 6 +++--- .../ext_dcd_test_eg/c_api_echo_test/ext_dcd_echo_test.h | 2 +- .../c_api_echo_test/ext_dcd_echo_test_fact.h | 2 +- decoder/tests/source/c_api_pkt_print_test.c | 2 +- 91 files changed, 122 insertions(+), 105 deletions(-) rename decoder/include/{ => opencsd}/c_api/ocsd_c_api_cust_fact.h (100%) rename decoder/include/{ => opencsd}/c_api/ocsd_c_api_cust_impl.h (98%) rename decoder/include/{ => opencsd}/c_api/ocsd_c_api_custom.h (100%) rename decoder/include/{ => opencsd}/c_api/ocsd_c_api_types.h (94%) rename decoder/include/{ => opencsd}/c_api/opencsd_c_api.h (100%) rename decoder/include/{ => opencsd}/etmv3/etmv3_decoder.h (88%) rename decoder/include/{ => opencsd}/etmv3/trc_cmp_cfg_etmv3.h (100%) rename decoder/include/{ => opencsd}/etmv3/trc_dcd_mngr_etmv3.h (100%) rename decoder/include/{ => opencsd}/etmv3/trc_pkt_decode_etmv3.h (98%) rename decoder/include/{ => opencsd}/etmv3/trc_pkt_elem_etmv3.h (100%) rename decoder/include/{ => opencsd}/etmv3/trc_pkt_proc_etmv3.h (100%) rename decoder/include/{ => opencsd}/etmv3/trc_pkt_types_etmv3.h (99%) rename decoder/include/{ => opencsd}/etmv4/etmv4_decoder.h (100%) rename decoder/include/{ => opencsd}/etmv4/trc_cmp_cfg_etmv4.h (100%) rename decoder/include/{ => opencsd}/etmv4/trc_dcd_mngr_etmv4i.h (100%) rename decoder/include/{ => opencsd}/etmv4/trc_etmv4_stack_elem.h (99%) rename decoder/include/{ => opencsd}/etmv4/trc_pkt_decode_etmv4i.h (98%) rename decoder/include/{ => opencsd}/etmv4/trc_pkt_elem_etmv4d.h (100%) rename decoder/include/{ => opencsd}/etmv4/trc_pkt_elem_etmv4i.h (100%) rename decoder/include/{ => opencsd}/etmv4/trc_pkt_proc_etmv4.h (100%) rename decoder/include/{ => opencsd}/etmv4/trc_pkt_types_etmv4.h (99%) rename decoder/include/{ => opencsd}/ocsd_if_types.h (99%) rename decoder/include/{ => opencsd}/ptm/ptm_decoder.h (100%) rename decoder/include/{ => opencsd}/ptm/trc_cmp_cfg_ptm.h (100%) rename decoder/include/{ => opencsd}/ptm/trc_dcd_mngr_ptm.h (100%) rename decoder/include/{ => opencsd}/ptm/trc_pkt_decode_ptm.h (98%) rename decoder/include/{ => opencsd}/ptm/trc_pkt_elem_ptm.h (100%) rename decoder/include/{ => opencsd}/ptm/trc_pkt_proc_ptm.h (100%) rename decoder/include/{ => opencsd}/ptm/trc_pkt_types_ptm.h (99%) rename decoder/include/{ => opencsd}/stm/stm_decoder.h (100%) rename decoder/include/{ => opencsd}/stm/trc_cmp_cfg_stm.h (100%) rename decoder/include/{ => opencsd}/stm/trc_dcd_mngr_stm.h (100%) rename decoder/include/{ => opencsd}/stm/trc_pkt_decode_stm.h (97%) rename decoder/include/{ => opencsd}/stm/trc_pkt_elem_stm.h (100%) rename decoder/include/{ => opencsd}/stm/trc_pkt_proc_stm.h (100%) rename decoder/include/{ => opencsd}/stm/trc_pkt_types_stm.h (99%) rename decoder/include/{ => opencsd}/trc_gen_elem_types.h (98%) rename decoder/include/{ => opencsd}/trc_pkt_types.h (97%)
-- 2.7.4
CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight
-- Mike Leach Principal Engineer, ARM Ltd. Blackburn Design Centre. UK
-- Mike Leach Principal Engineer, ARM Ltd. Blackburn Design Centre. UK