Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbf9dade

Browse files
committed
Beta 0.2v
0 parents  commitbf9dade

File tree

52 files changed

+11306
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+11306
-0
lines changed

‎.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.vscode
2+
build
3+
third_party
4+
*.bc
5+
*.o
6+
*.so
7+
node_names.h

‎CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
cmake_minimum_required(VERSION 3.15)
2+
set(CMAKE_C_STANDARD 99)
3+
if(CMAKE_VERSIONVERSION_GREATER_EQUAL"3.24.0")
4+
cmake_policy(SET CMP0135 NEW)
5+
endif()
6+
7+
project(
8+
"load_frida"
9+
VERSION 1.0
10+
LANGUAGES C
11+
)
12+
13+
include(frida.cmake)

‎Docker/Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM postgres:16
2+
3+
RUN apt-get update && \
4+
apt-get install -y \
5+
build-essential \
6+
postgresql-server-dev-16 \
7+
git \
8+
gcc \
9+
python3 \
10+
libkrb5-dev \
11+
krb5-multidev \
12+
cmake \
13+
&& rm -rf /var/lib/apt/lists/*
14+
15+
COPY ./pg_uprobe/ /usr/src/pg_uprobe
16+
17+
WORKDIR /usr/src/pg_uprobe
18+
RUN make USE_PGXS=1 PG_CONFIG=pg_config install
19+
20+
COPY ./configure.sh /docker-entrypoint-initdb.d/
21+
22+
23+
EXPOSE 5432
24+
CMD ["postgres"]

‎Docker/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
git clonegit@github.com:postgrespro/pg_uprobe.git
2+
3+
docker build -t pg16-pg_uprobe:latest .
4+
5+
docker run -d\
6+
--name pg16-pg_uprobe\
7+
-e POSTGRES_USER=postgres\
8+
-e POSTGRES_PASSWORD=postgres\
9+
-e POSTGRES_DB=postgres\
10+
-p 5432:5432\
11+
-v ./pg16-data:/var/lib/postgresql/data\
12+
pg16-pg_uprobe:latest
13+
14+
15+
docker exec -it pg16-pg_uprobe sh

‎Docker/configure.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
echo"shared_preload_libraries = 'pg_uprobe'">> /var/lib/postgresql/data/postgresql.conf

‎LICENSE

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
pg_uprobe is released under the PostgreSQL License, a liberal Open Source license, similar to the BSD or MIT licenses.
2+
3+
Copyright (c) 2014-2025, Postgres Professional
4+
Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
5+
Portions Copyright (c) 1994, The Regents of the University of California
6+
7+
Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.
8+
9+
IN NO EVENT SHALL POSTGRES PROFESSIONAL BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF POSTGRES PROFESSIONAL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10+
11+
POSTGRES PROFESSIONAL SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND POSTGRES PROFESSIONAL HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

‎Makefile

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# contrib/pg_uprobe/Makefile
2+
3+
# cmake install frida
4+
RUN_CMAKE_TO_INSTALL_FRIDA_0 :=$(shell mkdir -p build )
5+
RUN_CMAKE_TO_INSTALL_FRIDA_1 :=$(shell cmake -B ./build -S .)
6+
RUN_CMAKE_TO_INSTALL_FRIDA_2 :=$(shell cmake --build ./build)
7+
PG_CFLAGS += -I./build/FridaGum-prefix/src/FridaGum
8+
PG_CPPFLAGS += -I./build/FridaGum-prefix/src/FridaGum
9+
SHLIB_LINK += ./build/FridaGum-prefix/src/FridaGum/libfrida-gum.a
10+
11+
MODULE_big = pg_uprobe
12+
OBJS =\
13+
$(WIN32RES)\
14+
src/pg_uprobe.o\
15+
src/uprobe_internal.o\
16+
src/list.o\
17+
src/uprobe_collector.o\
18+
src/uprobe_message_buffer.o\
19+
src/uprobe_shared_config.o\
20+
src/count_uprobes.o\
21+
src/uprobe_factory.o\
22+
src/trace_execute_nodes.o\
23+
src/trace_lock_on_buffers.o\
24+
src/trace_parsing.o\
25+
src/trace_planning.o\
26+
src/trace_session.o\
27+
src/trace_wait_events.o\
28+
src/json_to_jsonbvalue_parser.o\
29+
src/lockmanager_trace.o\
30+
src/trace_file.o
31+
32+
PG_CFLAGS += -I./src/include
33+
PG_CPPFLAGS += -I./src/include
34+
PGFILEDESC = "pg_uprobe - allows measuring postgres functions execution time"
35+
36+
EXTENSION = pg_uprobe
37+
DATA = pg_uprobe--1.0.sql
38+
39+
REGRESS = pg_uprobe
40+
41+
SHLIB_LINK +=$(filter -lm,$(LIBS))
42+
EXTRA_CLEAN = node_names.h
43+
44+
ifdefUSE_PGXS
45+
PG_CONFIG ?= pg_config
46+
PGXS :=$(shell$(PG_CONFIG) --pgxs)
47+
PG_INCLUDE_DIR =$(shell$(PG_CONFIG) --includedir-server)
48+
include$(PGXS)
49+
else
50+
subdir = contrib/pg_uprobe
51+
top_builddir = ../..
52+
include$(top_builddir)/src/Makefile.global
53+
include$(top_srcdir)/contrib/contrib-global.mk
54+
PG_INCLUDE_DIR = ../../src/include
55+
endif
56+
GEN_LOG :=$(shell python3 gen_node_names_array.py$(MAJORVERSION)$(PG_INCLUDE_DIR)/nodes node_names.h)
57+
58+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp