Tarantool development patches archive
 help / color / mirror / Atom feed
From: Maxim Kokryashkin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: tarantool-patches@dev.tarantool.org, skaplun@tarantool.org,
	sergeyb@tarantool.org
Subject: [Tarantool-patches] [PATCH luajit v3 2/6] build: fix tool components handling
Date: Wed, 13 Mar 2024 17:40:14 +0300	[thread overview]
Message-ID: <b6e742e25a661e98492f4c51b6adb1d8307fbac6.1710340671.git.m.kokryashkin@tarantool.org> (raw)
In-Reply-To: <cover.1710340671.git.m.kokryashkin@tarantool.org>

Prior to this patch, memprof/process.lua wasn't added to the
dependency list as a part of the memprof parser sources. Also,
it wasn't installed into the system along with other memprof
sources, which breaks the profile parser.

Also, the sysprof parser sources weren't handled by the
Makefile.original at all. The same applies to utils/avl.lua.
This patch fixes that, so now it's possible to properly handle
sysprof's parser.

Part of tarantool/tarantool#5994
---
 Makefile.original    | 16 ++++++++++++----
 tools/CMakeLists.txt |  4 ++++
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/Makefile.original b/Makefile.original
index e67b6aa8..d0834fe6 100644
--- a/Makefile.original
+++ b/Makefile.original
@@ -40,6 +40,7 @@ INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit
 INSTALL_TOOLSLIB= $(INSTALL_LJLIBD)
 INSTALL_UTILSLIB= $(INSTALL_TOOLSLIB)/utils
 INSTALL_MEMPROFLIB= $(INSTALL_TOOLSLIB)/memprof
+INSTALL_SYSPROFLIB= $(INSTALL_TOOLSLIB)/sysprof
 INSTALL_LMODD= $(INSTALL_SHARE)/lua
 INSTALL_LMOD= $(INSTALL_LMODD)/$(ABIVER)
 INSTALL_CMODD= $(INSTALL_LIB)/lua
@@ -68,10 +69,12 @@ INSTALL_PC= $(INSTALL_PKGCONFIG)/$(INSTALL_PCNAME)
 
 INSTALL_DIRS= $(INSTALL_BIN) $(INSTALL_LIB) $(INSTALL_INC) $(INSTALL_MAN) \
   $(INSTALL_PKGCONFIG) $(INSTALL_JITLIB) $(INSTALL_LMOD) $(INSTALL_CMOD) \
-  $(INSTALL_UTILSLIB) $(INSTALL_MEMPROFLIB) $(INSTALL_TOOLSLIB)
+  $(INSTALL_UTILSLIB) $(INSTALL_MEMPROFLIB) $(INSTALL_SYSPROFLIB) \
+  $(INSTALL_TOOLSLIB)
 UNINSTALL_DIRS= $(INSTALL_JITLIB) $(INSTALL_LJLIBD) $(INSTALL_INC) \
   $(INSTALL_LMOD) $(INSTALL_LMODD) $(INSTALL_CMOD) $(INSTALL_CMODD) \
-  $(INSTALL_UTILSLIB) $(INSTALL_MEMPROFLIB) $(INSTALL_TOOLSLIB)
+  $(INSTALL_UTILSLIB) $(INSTALL_MEMPROFLIB) $(INSTALL_SYSPROFLIB) \
+  $(INSTALL_TOOLSLIB)
 
 RM= rm -f
 MKDIR= mkdir -p
@@ -95,8 +98,9 @@ FILES_JITLIB= bc.lua bcsave.lua dump.lua p.lua v.lua zone.lua \
 	      dis_arm64be.lua dis_ppc.lua dis_mips.lua dis_mipsel.lua \
 	      dis_mips64.lua dis_mips64el.lua vmdef.lua
 FILES_UTILSLIB= avl.lua bufread.lua symtab.lua
-FILES_MEMPROFLIB= parse.lua humanize.lua
-FILES_TOOLSLIB= memprof.lua
+FILES_MEMPROFLIB= humanize.lua parse.lua process.lua
+FILES_SYSPROFLIB= parse.lua
+FILES_TOOLSLIB= memprof.lua sysprof.lua
 
 ifeq (,$(findstring Windows,$(OS)))
   HOST_SYS:= $(shell uname -s)
@@ -140,6 +144,7 @@ install: $(INSTALL_DEP)
 	cd src/jit && $(INSTALL_F) $(FILES_JITLIB) $(INSTALL_JITLIB)
 	cd tools/utils && $(INSTALL_F) $(FILES_UTILSLIB) $(INSTALL_UTILSLIB)
 	cd tools/memprof && $(INSTALL_F) $(FILES_MEMPROFLIB) $(INSTALL_MEMPROFLIB)
+	cd tools/sysprof && $(INSTALL_F) $(FILES_SYSPROFLIB) $(INSTALL_SYSPROFLIB)
 	cd tools && $(INSTALL_F) $(FILES_TOOLSLIB) $(INSTALL_TOOLSLIB)
 	@echo "==== Successfully installed LuaJIT $(VERSION) to $(PREFIX) ===="
 	@echo ""
@@ -162,6 +167,9 @@ uninstall:
 	for file in $(FILES_MEMPROFLIB); do \
 	  $(UNINSTALL) $(INSTALL_MEMPROFLIB)/$$file; \
 	  done
+	for file in $(FILES_SYSPROFLIB); do \
+	  $(UNINSTALL) $(INSTALL_SYSPROFLIB)/$$file; \
+	  done
 	for file in $(FILES_TOOLSLIB); do \
 	  $(UNINSTALL) $(INSTALL_TOOLSLIB)/$$file; \
 	  done
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 1dfc39e4..a4adc15b 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -14,6 +14,7 @@ else()
   add_custom_target(tools-parse-memprof EXCLUDE_FROM_ALL DEPENDS
     memprof/humanize.lua
     memprof/parse.lua
+    memprof/process.lua
     memprof.lua
     utils/avl.lua
     utils/bufread.lua
@@ -24,6 +25,7 @@ else()
   install(FILES
       ${CMAKE_CURRENT_SOURCE_DIR}/memprof/humanize.lua
       ${CMAKE_CURRENT_SOURCE_DIR}/memprof/parse.lua
+      ${CMAKE_CURRENT_SOURCE_DIR}/memprof/process.lua
     DESTINATION ${LUAJIT_DATAROOTDIR}/memprof
     PERMISSIONS
       OWNER_READ OWNER_WRITE
@@ -61,6 +63,7 @@ else()
   add_custom_target(tools-parse-sysprof EXCLUDE_FROM_ALL DEPENDS
     sysprof/parse.lua
     sysprof.lua
+    utils/avl.lua
     utils/bufread.lua
     utils/symtab.lua
   )
@@ -76,6 +79,7 @@ else()
     COMPONENT tools-parse-sysprof
   )
   install(FILES
+      ${CMAKE_CURRENT_SOURCE_DIR}/utils/avl.lua
       ${CMAKE_CURRENT_SOURCE_DIR}/utils/bufread.lua
       ${CMAKE_CURRENT_SOURCE_DIR}/utils/symtab.lua
     DESTINATION ${LUAJIT_DATAROOTDIR}/utils
-- 
2.44.0


  parent reply	other threads:[~2024-03-13 14:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13 14:40 [Tarantool-patches] [PATCH luajit v3 0/6] profilers: refactor parsers Maxim Kokryashkin via Tarantool-patches
2024-03-13 14:40 ` [Tarantool-patches] [PATCH luajit v3 1/6] build: purge sysprof.collapse module Maxim Kokryashkin via Tarantool-patches
2024-03-13 14:40 ` Maxim Kokryashkin via Tarantool-patches [this message]
2024-03-13 14:40 ` [Tarantool-patches] [PATCH luajit v3 3/6] memprof: refactor `heap_chunk` data structure Maxim Kokryashkin via Tarantool-patches
2024-03-13 14:40 ` [Tarantool-patches] [PATCH luajit v3 4/6] memprof: remove unused arguments Maxim Kokryashkin via Tarantool-patches
2024-03-13 14:40 ` [Tarantool-patches] [PATCH luajit v3 5/6] memprof: introduce the `--human-readable` option Maxim Kokryashkin via Tarantool-patches
2024-03-13 14:40 ` [Tarantool-patches] [PATCH luajit v3 6/6] profilers: introduce event reader module Maxim Kokryashkin via Tarantool-patches
2024-03-15  8:44 ` [Tarantool-patches] [PATCH luajit v3 0/6] profilers: refactor parsers Sergey Kaplun via Tarantool-patches
2024-03-20 15:08 ` Sergey Kaplun 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=b6e742e25a661e98492f4c51b6adb1d8307fbac6.1710340671.git.m.kokryashkin@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=max.kokryashkin@gmail.com \
    --cc=sergeyb@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit v3 2/6] build: fix tool components handling' \
    /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