Tarantool development patches archive
 help / color / mirror / Atom feed
From: "Максим Корякшин via Tarantool-patches" <tarantool-patches@dev.tarantool.org>
To: "Sergey Kaplun" <skaplun@tarantool.org>
Cc: "Maxim Kokryashkin" <max.kokryashkin@gmail.com>,
	tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches]  [PATCH] memprof: introduce a CLI flag to run dump parser
Date: Sun, 05 Sep 2021 16:59:40 +0300	[thread overview]
Message-ID: <1630850380.522964250@f544.i.mail.ru> (raw)
In-Reply-To: <YR/PFMaQlGQcjYIR@root>

[-- Attachment #1: Type: text/plain, Size: 2724 bytes --]


 
 
<snipped>
>
>>
>> Closes tarantool/tarantool#5688
>> ---
>> CMakeLists.txt | 8 +++++---
>> src/CMakeLists.txt | 5 +++++
>> src/lj_tools_conf.h.in | 6 ++++++
>> src/luajit.c | 36 ++++++++++++++++++++++++++++--------
>> tools/CMakeLists.txt | 2 ++
>> 5 files changed, 46 insertions(+), 11 deletions(-)
>> create mode 100644 src/lj_tools_conf.h.in
>>
>> diff --git a/CMakeLists.txt b/CMakeLists.txt
>> index 5348e043..619e9441 100644
>> --- a/CMakeLists.txt
>> +++ b/CMakeLists.txt
>> @@ -250,6 +250,11 @@ endif()
>> # related compiler and linker flags passed. This should be done
>> # the right way later.
>>
>> +# --- Tools --------------------------------------------------------------------
>> +
>> +add_subdirectory(tools)
>> +set(LUAJIT_TOOLS_DIR "${LUAJIT_TOOLS_DIR}")
>> +
>> # --- Main source tree ---------------------------------------------------------
>>
>> add_subdirectory(src)
>> @@ -258,9 +263,6 @@ add_subdirectory(src)
>>
>> add_subdirectory(etc)
>>
>> -# --- Tools --------------------------------------------------------------------
>> -
>> -add_subdirectory(tools)
>Why do we need this code movement?
We need this because there is a template file, which CMake generates during the
build process. 
>>
>> # --- Testing source tree ------------------------------------------------------
>>
>> diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
>> index 809aac68..d9debccf 100644
>> --- a/src/CMakeLists.txt
>> +++ b/src/CMakeLists.txt
>> @@ -142,6 +142,8 @@ make_source_list(SOURCES_CORE_NO_JIT_FFI
>> ${SOURCES_UTILS}
>> )
>>
>> +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lj_tools_conf.h.in ${CMAKE_CURRENT_SOURCE_DIR}/lj_tools_conf.h)
>> +
>> set(SOURCES_CORE ${SOURCES_CORE_NO_JIT_FFI})
>>
>> # Build JIT sources if JIT support is enabled.
>> @@ -248,6 +250,9 @@ add_custom_target(
>> jit/vmdef.lua
>> )
>>
>> +# --- Generate luajit tools config header -------------------------------------
>> +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lj_tools_conf.h.in ${CMAKE_CURRENT_SOURCE_DIR}/lj_tools_conf.h)
>> +
>> # --- Generate core and VM object files ---------------------------------------
>>
>> # Virtual machine.
>> diff --git a/src/lj_tools_conf.h.in b/src/lj_tools_conf.h.in
>> new file mode 100644
>> index 00000000..366c3ec4
>> --- /dev/null
>> +++ b/src/lj_tools_conf.h.in
>> @@ -0,0 +1,6 @@
>> +#ifndef LJ_TOOLS_CONF_H
>> +#define LJ_TOOLS_CONF_H
>> +
>> +#define PARSER_PATH "@LUAJIT_TOOLS_DIR@/memprof.lua"
>> +
>> +#endif
As I already said, this is a template file, which holds a path to
memprof.lua script after build completion. Thanks to this template,
the flag will properly work regardless of whether the luajit was
installed or not. 
>For what do we need this file?
<snipped>
 

[-- Attachment #2: Type: text/html, Size: 3533 bytes --]

  reply	other threads:[~2021-09-05 13:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-29 11:51 Maxim Kokryashkin via Tarantool-patches
2021-07-29 11:53 ` Максим Корякшин via Tarantool-patches
2021-07-29 11:55   ` Максим Корякшин via Tarantool-patches
2021-08-20 15:49 ` Sergey Kaplun via Tarantool-patches
2021-09-05 13:59   ` Максим Корякшин via Tarantool-patches [this message]
2021-09-12  9:34     ` Максим Корякшин via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1630850380.522964250@f544.i.mail.ru \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=m.kokryashkin@tarantool.org \
    --cc=max.kokryashkin@gmail.com \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches]  [PATCH] memprof: introduce a CLI flag to run dump parser' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox