From ef8651aaa5f1eaeb5065c4cd35d26ef6d569e8f4 Mon Sep 17 00:00:00 2001 From: jbarritaud Date: Mon, 31 Jul 2023 16:35:26 +0200 Subject: [PATCH 01/60] Create main.yml --- .github/workflows/main.yml | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..7219319 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,41 @@ +name: Quanta PHP Module builder + +on: + push: + branches: + - 'master' + pull_request: + branches: + - '**' + types: + - opened + - edited + - synchronize + - labeled + + workflow_dispatch: + +permissions: + id-token: write + contents: read + +env: + PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + + build_php_module: + if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') + environment: build + name: 'QM3K PHP Module build' + runs-on: ubuntu-latest + + steps: + - name: Clone quanta-php-module repository + uses: actions/checkout@v3 + + - name: Clone Buildozer repository + uses: actions/checkout@v3 + with: + repository: quanta-computing/buildozer + persist-credentials: true From 8336f3999edd2b9970d43ae641d0db4e72c97115 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Mon, 31 Jul 2023 16:42:17 +0200 Subject: [PATCH 02/60] add branch --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7219319..c48a0c4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,4 +38,4 @@ jobs: uses: actions/checkout@v3 with: repository: quanta-computing/buildozer - persist-credentials: true + ref: 'master' From 797e3a5950c4a3710209cf2b163d1489ae539a02 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Mon, 31 Jul 2023 17:41:12 +0200 Subject: [PATCH 03/60] add key for buildozer and list files --- .github/workflows/main.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c48a0c4..4b5f602 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,11 +31,15 @@ jobs: runs-on: ubuntu-latest steps: - - name: Clone quanta-php-module repository - uses: actions/checkout@v3 + - name: List files + run: ls -lRa . - name: Clone Buildozer repository uses: actions/checkout@v3 with: + ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} repository: quanta-computing/buildozer - ref: 'master' + persist-credentials: true + + - name: List files again + run: ls -lRa . From e46221996b65e46dceb8d32098c1508cfd2b2524 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Mon, 31 Jul 2023 17:43:22 +0200 Subject: [PATCH 04/60] add current repo checkout --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4b5f602..59271fe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,12 +34,18 @@ jobs: - name: List files run: ls -lRa . + - name: Clone Quanta PHP Module repository + uses: actions/checkout@v3 + with: + path: php-module + - name: Clone Buildozer repository uses: actions/checkout@v3 with: ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} repository: quanta-computing/buildozer persist-credentials: true + path: buildozer - name: List files again run: ls -lRa . From 5db86f4f877d459960f6cc0a23e63eb55596fc91 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Tue, 1 Aug 2023 17:14:09 +0200 Subject: [PATCH 05/60] try to run buildozer first time --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 59271fe..fd52b52 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,7 +45,10 @@ jobs: ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} repository: quanta-computing/buildozer persist-credentials: true - path: buildozer + path: buildozer-repo + + - name: Build the PHP package + run: ./buildozer-repo/buildozer -t php56-quanta-mon -o debian -v jessie -s ./php-module/ -r php56 - name: List files again run: ls -lRa . From ccdfeac041799c657c2f34d9a47b1e7e543b925f Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Tue, 1 Aug 2023 17:17:26 +0200 Subject: [PATCH 06/60] try fixing erroring path --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fd52b52..6b90bc3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -48,7 +48,9 @@ jobs: path: buildozer-repo - name: Build the PHP package - run: ./buildozer-repo/buildozer -t php56-quanta-mon -o debian -v jessie -s ./php-module/ -r php56 + run: | + cd buildozer-repo + ./buildozer -t php56-quanta-mon -o debian -v jessie -s /php-module/ -r php56 - name: List files again run: ls -lRa . From 4059203dae931cccf6fd482f222ab06ea49ce3d1 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Tue, 1 Aug 2023 17:19:37 +0200 Subject: [PATCH 07/60] fix buildozer using path --- .github/workflows/main.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6b90bc3..c662afc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,10 +47,17 @@ jobs: persist-credentials: true path: buildozer-repo + - name: List files again + run: ls -lRa . + + - name: Build the PHP package run: | cd buildozer-repo - ./buildozer -t php56-quanta-mon -o debian -v jessie -s /php-module/ -r php56 + ls -l + pwd + ls -l ../ + ./buildozer -t php56-quanta-mon -o debian -v jessie -s ../php-module/ -r php56 - name: List files again run: ls -lRa . From 937fbd3c07b20e8aed82ba7a37f1e63a5318b0cf Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Tue, 1 Aug 2023 17:22:24 +0200 Subject: [PATCH 08/60] try with buster and recent php version --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c662afc..30fce04 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,7 +57,7 @@ jobs: ls -l pwd ls -l ../ - ./buildozer -t php56-quanta-mon -o debian -v jessie -s ../php-module/ -r php56 + ./buildozer -t php74-quanta-mon -o debian -v buster -s ../php-module/ -r php74-buster - name: List files again run: ls -lRa . From 6ea9d5d47c99ed5a63cfe43577ab294db4404542 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Tue, 1 Aug 2023 17:32:10 +0200 Subject: [PATCH 09/60] remove debug and rebuild from / --- .github/workflows/main.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 30fce04..7327f87 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,13 +31,8 @@ jobs: runs-on: ubuntu-latest steps: - - name: List files - run: ls -lRa . - - name: Clone Quanta PHP Module repository uses: actions/checkout@v3 - with: - path: php-module - name: Clone Buildozer repository uses: actions/checkout@v3 @@ -45,19 +40,13 @@ jobs: ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} repository: quanta-computing/buildozer persist-credentials: true - path: buildozer-repo - name: List files again run: ls -lRa . - - name: Build the PHP package run: | - cd buildozer-repo - ls -l - pwd - ls -l ../ - ./buildozer -t php74-quanta-mon -o debian -v buster -s ../php-module/ -r php74-buster + ./buildozer -t php74-quanta-mon -o debian -v buster -s . -r debian-buster - name: List files again run: ls -lRa . From a7907c1d686de638c21dae449c3cad8023b2441f Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Tue, 1 Aug 2023 17:38:54 +0200 Subject: [PATCH 10/60] finnaly understanding the pathing --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7327f87..68e9c0a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,6 +33,8 @@ jobs: steps: - name: Clone Quanta PHP Module repository uses: actions/checkout@v3 + with: + path: php-module - name: Clone Buildozer repository uses: actions/checkout@v3 @@ -46,7 +48,7 @@ jobs: - name: Build the PHP package run: | - ./buildozer -t php74-quanta-mon -o debian -v buster -s . -r debian-buster + ./buildozer -t php74-quanta-mon -o debian -v buster -s ./php-module/extension -r debian-buster - name: List files again run: ls -lRa . From 840598ea45c15e379fbd892bdb457a7dae53f5db Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Tue, 1 Aug 2023 17:42:24 +0200 Subject: [PATCH 11/60] finnaly understanding the pathing 2 --- .github/workflows/main.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 68e9c0a..8e0a606 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,8 +33,6 @@ jobs: steps: - name: Clone Quanta PHP Module repository uses: actions/checkout@v3 - with: - path: php-module - name: Clone Buildozer repository uses: actions/checkout@v3 From db29ac95531c033b73c09f70c482a48ebe4c5622 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Tue, 1 Aug 2023 17:45:51 +0200 Subject: [PATCH 12/60] try to resplit directory because home is overriding itself --- .github/workflows/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8e0a606..f57b2b2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,6 +33,8 @@ jobs: steps: - name: Clone Quanta PHP Module repository uses: actions/checkout@v3 + with: + path: php-module - name: Clone Buildozer repository uses: actions/checkout@v3 @@ -40,13 +42,15 @@ jobs: ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} repository: quanta-computing/buildozer persist-credentials: true + path: tools - name: List files again run: ls -lRa . - name: Build the PHP package run: | - ./buildozer -t php74-quanta-mon -o debian -v buster -s ./php-module/extension -r debian-buster + cd tools + ./buildozer -t php74-quanta-mon -o debian -v buster -s ../php-module/extension/ -r debian-buster - name: List files again run: ls -lRa . From 347e8d8ef2bf1046a76f2904197e753a72d3499d Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Tue, 1 Aug 2023 17:54:05 +0200 Subject: [PATCH 13/60] try double build with 2 version --- .github/workflows/main.yml | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f57b2b2..5f48233 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,11 +23,10 @@ env: PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - - build_php_module: + debian-buster-php73: if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') environment: build - name: 'QM3K PHP Module build' + name: 'PHP 7.3 for Debian Buster' runs-on: ubuntu-latest steps: @@ -44,13 +43,32 @@ jobs: persist-credentials: true path: tools - - name: List files again - run: ls -lRa . + - name: Build the PHP package + run: | + cd tools + ./buildozer -t php73-quanta-mon -o debian -v buster -s ../php-module/extension/ -r debian-buster + + debian-buster-php74: + if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') + environment: build + name: 'PHP 7.4 for Debian Buster' + runs-on: ubuntu-latest + + steps: + - name: Clone Quanta PHP Module repository + uses: actions/checkout@v3 + with: + path: php-module + + - name: Clone Buildozer repository + uses: actions/checkout@v3 + with: + ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} + repository: quanta-computing/buildozer + persist-credentials: true + path: tools - name: Build the PHP package run: | cd tools ./buildozer -t php74-quanta-mon -o debian -v buster -s ../php-module/extension/ -r debian-buster - - - name: List files again - run: ls -lRa . From 766cb5e002d1e793e61903decac4ed4a28686ac5 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Wed, 2 Aug 2023 09:36:44 +0200 Subject: [PATCH 14/60] try matrix to build multiple image --- .github/workflows/main.yml | 35 +++++++---------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5f48233..d2ad700 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,11 +23,15 @@ env: PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - debian-buster-php73: + debian-builds: if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') environment: build - name: 'PHP 7.3 for Debian Buster' + name: 'PHP 7.3, 7.4 for debian jessie, stretch, buster' runs-on: ubuntu-latest + strategy: + matrix: + php-version: [php73, php74] #php72, php80, php81, php82 + debian-version: [jessie, stretch, buster] #bullseye, bookworm steps: - name: Clone Quanta PHP Module repository @@ -46,29 +50,4 @@ jobs: - name: Build the PHP package run: | cd tools - ./buildozer -t php73-quanta-mon -o debian -v buster -s ../php-module/extension/ -r debian-buster - - debian-buster-php74: - if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') - environment: build - name: 'PHP 7.4 for Debian Buster' - runs-on: ubuntu-latest - - steps: - - name: Clone Quanta PHP Module repository - uses: actions/checkout@v3 - with: - path: php-module - - - name: Clone Buildozer repository - uses: actions/checkout@v3 - with: - ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} - repository: quanta-computing/buildozer - persist-credentials: true - path: tools - - - name: Build the PHP package - run: | - cd tools - ./buildozer -t php74-quanta-mon -o debian -v buster -s ../php-module/extension/ -r debian-buster + ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r debian-${{ matrix.debian-version }} From 4b27c55a5bc4826248eb6ea41c67723b68504469 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Wed, 2 Aug 2023 09:37:37 +0200 Subject: [PATCH 15/60] fix indentation --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d2ad700..65c836d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,9 +29,9 @@ jobs: name: 'PHP 7.3, 7.4 for debian jessie, stretch, buster' runs-on: ubuntu-latest strategy: - matrix: - php-version: [php73, php74] #php72, php80, php81, php82 - debian-version: [jessie, stretch, buster] #bullseye, bookworm + matrix: + php-version: [php73, php74] #php72, php80, php81, php82 + debian-version: [jessie, stretch, buster] #bullseye, bookworm steps: - name: Clone Quanta PHP Module repository From 76ddf0d540dfd0b378bb58ec75f50f3728b141bd Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Wed, 2 Aug 2023 09:39:40 +0200 Subject: [PATCH 16/60] try matrixing also the description --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 65c836d..497b780 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: debian-builds: if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') environment: build - name: 'PHP 7.3, 7.4 for debian jessie, stretch, buster' + name: 'Building ${{ matrix.php-version }} for Debian ${{ matrix.debian-version }}' runs-on: ubuntu-latest strategy: matrix: From 1ac7bdb7970e03986897628ed9a5c3161046359f Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Wed, 2 Aug 2023 09:44:14 +0200 Subject: [PATCH 17/60] remove the fail-fast default strategy because we want to build as much as package as posisble --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 497b780..dd78cc7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,6 +29,7 @@ jobs: name: 'Building ${{ matrix.php-version }} for Debian ${{ matrix.debian-version }}' runs-on: ubuntu-latest strategy: + fail-fast: false matrix: php-version: [php73, php74] #php72, php80, php81, php82 debian-version: [jessie, stretch, buster] #bullseye, bookworm From 64aa8b8ae276e05786fe81571e0124b2780651ea Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Wed, 2 Aug 2023 10:04:25 +0200 Subject: [PATCH 18/60] add new // jobs for centos --- .github/workflows/main.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dd78cc7..a1ec595 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,3 +52,34 @@ jobs: run: | cd tools ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r debian-${{ matrix.debian-version }} + + + centos-builds: + if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') + environment: build + name: 'Building ${{ matrix.php-version }} for CentOS ${{ matrix.centos-version }}' + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php-version: [php73, php74] #php72, php80, php81, php82 + centos-version: [6, 7] #8 + + steps: + - name: Clone Quanta PHP Module repository + uses: actions/checkout@v3 + with: + path: php-module + + - name: Clone Buildozer repository + uses: actions/checkout@v3 + with: + ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} + repository: quanta-computing/buildozer + persist-credentials: true + path: tools + + - name: Build the PHP package + run: | + cd tools + ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -s ../php-module/extension/ -r centos-${{ matrix.centos-version }} From 229245e52be4c77b104b2ce6b1c7be74c88f245c Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Wed, 2 Aug 2023 11:07:27 +0200 Subject: [PATCH 19/60] try to put packages as artifact --- .github/workflows/main.yml | 69 +++++++++++++++++++++++--------------- 1 file changed, 42 insertions(+), 27 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a1ec595..1c79d2b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,35 +51,50 @@ jobs: - name: Build the PHP package run: | cd tools - ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r debian-${{ matrix.debian-version }} + ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r ${{ matrix.debian-version }} + - name: gzip packages + run: | + cd tools/buildozer/debian/pkg/ + tar czvf debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz ${{ matrix.php-version }}-quanta-mon-${{ matrix.debian-version }} - centos-builds: - if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') - environment: build - name: 'Building ${{ matrix.php-version }} for CentOS ${{ matrix.centos-version }}' - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php-version: [php73, php74] #php72, php80, php81, php82 - centos-version: [6, 7] #8 - - steps: - - name: Clone Quanta PHP Module repository - uses: actions/checkout@v3 + - name: Upload package to release + uses: svenstaro/upload-release-action@v2 with: - path: php-module + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: tools/buildozer/debian/pkg/debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz + asset_name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz + tag: ${{ github.ref }} + overwrite: true + body: "Packages of ${{ matrix.php-version }} for Debian ${{ matrix.debian-version }} are ready" - - name: Clone Buildozer repository - uses: actions/checkout@v3 - with: - ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} - repository: quanta-computing/buildozer - persist-credentials: true - path: tools - - name: Build the PHP package - run: | - cd tools - ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -s ../php-module/extension/ -r centos-${{ matrix.centos-version }} + # centos-builds: + # if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') + # environment: build + # name: 'Building ${{ matrix.php-version }} for CentOS ${{ matrix.centos-version }}' + # runs-on: ubuntu-latest + # strategy: + # fail-fast: false + # matrix: + # php-version: [php73, php74] #php72, php80, php81, php82 + # centos-version: [6, 7] #8 + + # steps: + # - name: Clone Quanta PHP Module repository + # uses: actions/checkout@v3 + # with: + # path: php-module + + # - name: Clone Buildozer repository + # uses: actions/checkout@v3 + # with: + # ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} + # repository: quanta-computing/buildozer + # persist-credentials: true + # path: tools + + # - name: Build the PHP package + # run: | + # cd tools + # ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -s ../php-module/extension/ -r centos-${{ matrix.centos-version }} From 9d5118f7cfed57bdda782ebfc10f2acce1641384 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Wed, 2 Aug 2023 11:12:32 +0200 Subject: [PATCH 20/60] try gzip again --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1c79d2b..64fb9ff 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,14 +55,14 @@ jobs: - name: gzip packages run: | - cd tools/buildozer/debian/pkg/ + cd tools/debian/${{ matrix.debian-version }}/pkg/ tar czvf debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz ${{ matrix.php-version }}-quanta-mon-${{ matrix.debian-version }} - name: Upload package to release uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: tools/buildozer/debian/pkg/debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz + file: tools/debian/${{ matrix.debian-version }}/pkg/debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz asset_name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz tag: ${{ github.ref }} overwrite: true From 2ca9295b3b1437497446e80c7ad74cc0104eea1c Mon Sep 17 00:00:00 2001 From: Matthieu Rosinski Date: Thu, 3 Aug 2023 10:33:24 +0200 Subject: [PATCH 21/60] fix possible segfault in zend_functions_info --- extension/include/quanta_mon.h | 2 +- extension/src/profiler/zend_functions_info.c | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/extension/include/quanta_mon.h b/extension/include/quanta_mon.h index 978c086..6d9e788 100644 --- a/extension/include/quanta_mon.h +++ b/extension/include/quanta_mon.h @@ -45,7 +45,7 @@ /* Size of a temp scratch buffer */ #define SCRATCH_BUF_LEN 512 -#define QUANTA_MON_VERSION "1.3.1" +#define QUANTA_MON_VERSION "1.3.3" /* Xhprof's global state. diff --git a/extension/src/profiler/zend_functions_info.c b/extension/src/profiler/zend_functions_info.c index e732ae2..ab148f9 100644 --- a/extension/src/profiler/zend_functions_info.c +++ b/extension/src/profiler/zend_functions_info.c @@ -115,14 +115,19 @@ char *hp_get_function_name(zend_execute_data *data TSRMLS_DC) { * you'll see something like "run_init::foo.php" in your reports. */ if (add_filename){ - const char *filename; + const char *filename = NULL; int len; + + if (curr_func->op_array.filename) { #if PHP_MAJOR_VERSION < 7 - filename = hp_get_base_filename(curr_func->op_array.filename); + filename = hp_get_base_filename(curr_func->op_array.filename); #else - filename = hp_get_base_filename(ZSTR_VAL(curr_func->op_array.filename)); + filename = hp_get_base_filename(ZSTR_VAL(curr_func->op_array.filename)); #endif - len = strlen("run_init") + strlen(filename) + 3; + } + if (!filename) + filename = "???"; + len = strlen("run_init::") + strlen(filename) + 1; ret = (char *)emalloc(len); snprintf(ret, len, "run_init::%s", filename); } else { From ea3b04c31c34ea3cb078da4685813c5dcdc45782 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Thu, 3 Aug 2023 11:37:16 +0200 Subject: [PATCH 22/60] change upload method --- .github/workflows/main.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 64fb9ff..0aeed2b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,7 @@ jobs: fail-fast: false matrix: php-version: [php73, php74] #php72, php80, php81, php82 - debian-version: [jessie, stretch, buster] #bullseye, bookworm + debian-version: [buster] #bullseye, bookworm steps: - name: Clone Quanta PHP Module repository @@ -53,21 +53,11 @@ jobs: cd tools ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r ${{ matrix.debian-version }} - - name: gzip packages - run: | - cd tools/debian/${{ matrix.debian-version }}/pkg/ - tar czvf debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz ${{ matrix.php-version }}-quanta-mon-${{ matrix.debian-version }} - - - name: Upload package to release - uses: svenstaro/upload-release-action@v2 + - name: Upload packages + uses: actions/upload-artifact@v3 with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: tools/debian/${{ matrix.debian-version }}/pkg/debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz - asset_name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz - tag: ${{ github.ref }} - overwrite: true - body: "Packages of ${{ matrix.php-version }} for Debian ${{ matrix.debian-version }} are ready" - + name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz + path: tools/debian/${{ matrix.debian-version }}/pkg/ # centos-builds: # if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') From add210bdd443486622d644859071d51ebcfe322c Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Thu, 3 Aug 2023 11:45:59 +0200 Subject: [PATCH 23/60] tests centos builds --- .github/workflows/main.yml | 78 ++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 36 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0aeed2b..503a79f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,16 +23,52 @@ env: PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - debian-builds: + # debian-builds: + # if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') + # environment: build + # name: 'Building ${{ matrix.php-version }} for Debian ${{ matrix.debian-version }}' + # runs-on: ubuntu-latest + # strategy: + # fail-fast: false + # matrix: + # php-version: [php73, php74] #php72, php80, php81, php82 + # debian-version: [buster] #bullseye, bookworm + + # steps: + # - name: Clone Quanta PHP Module repository + # uses: actions/checkout@v3 + # with: + # path: php-module + + # - name: Clone Buildozer repository + # uses: actions/checkout@v3 + # with: + # ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} + # repository: quanta-computing/buildozer + # persist-credentials: true + # path: tools + + # - name: Build the PHP package + # run: | + # cd tools + # ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r ${{ matrix.debian-version }} + + # - name: Upload packages + # uses: actions/upload-artifact@v3 + # with: + # name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz + # path: tools/debian/${{ matrix.debian-version }}/pkg/ + + centos-builds: if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') environment: build - name: 'Building ${{ matrix.php-version }} for Debian ${{ matrix.debian-version }}' + name: 'Building ${{ matrix.php-version }} for CentOS ${{ matrix.centos-version }}' runs-on: ubuntu-latest strategy: fail-fast: false matrix: php-version: [php73, php74] #php72, php80, php81, php82 - debian-version: [buster] #bullseye, bookworm + centos-version: [7] #8 steps: - name: Clone Quanta PHP Module repository @@ -51,40 +87,10 @@ jobs: - name: Build the PHP package run: | cd tools - ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r ${{ matrix.debian-version }} + ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -s ../php-module/extension/ -r centos-${{ matrix.centos-version }} - name: Upload packages uses: actions/upload-artifact@v3 with: - name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz - path: tools/debian/${{ matrix.debian-version }}/pkg/ - - # centos-builds: - # if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') - # environment: build - # name: 'Building ${{ matrix.php-version }} for CentOS ${{ matrix.centos-version }}' - # runs-on: ubuntu-latest - # strategy: - # fail-fast: false - # matrix: - # php-version: [php73, php74] #php72, php80, php81, php82 - # centos-version: [6, 7] #8 - - # steps: - # - name: Clone Quanta PHP Module repository - # uses: actions/checkout@v3 - # with: - # path: php-module - - # - name: Clone Buildozer repository - # uses: actions/checkout@v3 - # with: - # ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} - # repository: quanta-computing/buildozer - # persist-credentials: true - # path: tools - - # - name: Build the PHP package - # run: | - # cd tools - # ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -s ../php-module/extension/ -r centos-${{ matrix.centos-version }} + name: centos-${{ matrix.centos-version }}-${{ matrix.php-version }}.tgz + path: tools/centos/${{ matrix.centos-version }}/pkg/ From 763e75f4f5c5abd4f7ef593f11741be4c7e8e6f9 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Thu, 3 Aug 2023 12:28:17 +0200 Subject: [PATCH 24/60] add bullseye for debian builds --- .github/workflows/main.yml | 85 +++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 42 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 503a79f..2155d11 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,52 +23,16 @@ env: PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - # debian-builds: - # if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') - # environment: build - # name: 'Building ${{ matrix.php-version }} for Debian ${{ matrix.debian-version }}' - # runs-on: ubuntu-latest - # strategy: - # fail-fast: false - # matrix: - # php-version: [php73, php74] #php72, php80, php81, php82 - # debian-version: [buster] #bullseye, bookworm - - # steps: - # - name: Clone Quanta PHP Module repository - # uses: actions/checkout@v3 - # with: - # path: php-module - - # - name: Clone Buildozer repository - # uses: actions/checkout@v3 - # with: - # ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} - # repository: quanta-computing/buildozer - # persist-credentials: true - # path: tools - - # - name: Build the PHP package - # run: | - # cd tools - # ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r ${{ matrix.debian-version }} - - # - name: Upload packages - # uses: actions/upload-artifact@v3 - # with: - # name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz - # path: tools/debian/${{ matrix.debian-version }}/pkg/ - - centos-builds: + debian-builds: if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') environment: build - name: 'Building ${{ matrix.php-version }} for CentOS ${{ matrix.centos-version }}' + name: 'Building ${{ matrix.php-version }} for Debian ${{ matrix.debian-version }}' runs-on: ubuntu-latest strategy: fail-fast: false matrix: php-version: [php73, php74] #php72, php80, php81, php82 - centos-version: [7] #8 + debian-version: [buster, bullseye] #, bookworm steps: - name: Clone Quanta PHP Module repository @@ -81,16 +45,53 @@ jobs: with: ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} repository: quanta-computing/buildozer + ref: 'new-packages-worflow' persist-credentials: true path: tools - name: Build the PHP package run: | cd tools - ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -s ../php-module/extension/ -r centos-${{ matrix.centos-version }} + ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r ${{ matrix.debian-version }} - name: Upload packages uses: actions/upload-artifact@v3 with: - name: centos-${{ matrix.centos-version }}-${{ matrix.php-version }}.tgz - path: tools/centos/${{ matrix.centos-version }}/pkg/ + name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz + path: tools/debian/${{ matrix.debian-version }}/pkg/ + + # centos-builds: + # if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') + # environment: build + # name: 'Building ${{ matrix.php-version }} for CentOS ${{ matrix.centos-version }}' + # runs-on: ubuntu-latest + # strategy: + # fail-fast: false + # matrix: + # php-version: [php73, php74] #php72, php80, php81, php82 + # centos-version: [7] #8 + + # steps: + # - name: Clone Quanta PHP Module repository + # uses: actions/checkout@v3 + # with: + # path: php-module + + # - name: Clone Buildozer repository + # uses: actions/checkout@v3 + # with: + # ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} + # repository: quanta-computing/buildozer + # persist-credentials: true + # path: tools + + # - name: Build the PHP package + # run: | + # cd tools + # ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -s ../php-module/extension/ -r centos-${{ matrix.centos-version }} + + # - name: Upload packages + # uses: actions/upload-artifact@v3 + # with: + # name: centos-${{ matrix.centos-version }}-${{ matrix.php-version }}.tgz + # path: tools/centos/${{ matrix.centos-version }}/pkg/ From bb6140ab3ea9b5de7e22f8d20f8a6a7654bb2f9f Mon Sep 17 00:00:00 2001 From: Matthieu Rosinski Date: Thu, 3 Aug 2023 16:56:59 +0200 Subject: [PATCH 25/60] cleanup --- extension/Makefile.local | 35 - extension/gen_tree.rb | 110 - extension/old_metrics.txt | 141 - extension/php_quanta_mon.h | 43 - extension/quanta_mon.orig.c | 2873 --------------------- extension/src/computed_functions_filter.c | 418 --- extension/tools/benchmark.c | 124 - 7 files changed, 3744 deletions(-) delete mode 100644 extension/Makefile.local delete mode 100644 extension/gen_tree.rb delete mode 100644 extension/old_metrics.txt delete mode 100644 extension/php_quanta_mon.h delete mode 100644 extension/quanta_mon.orig.c delete mode 100644 extension/src/computed_functions_filter.c delete mode 100644 extension/tools/benchmark.c diff --git a/extension/Makefile.local b/extension/Makefile.local deleted file mode 100644 index d291800..0000000 --- a/extension/Makefile.local +++ /dev/null @@ -1,35 +0,0 @@ -include Makefile - -GOODPHP = $(shell $(PHP_EXECUTABLE) -r 'echo version_compare(phpversion(), "5.5.0", ">=");') -ifeq ($(GOODPHP), 1) -TESTTARGET = test -else -TESTTARGET = test_from_php55 -endif - -test_with_exit_status: $(TESTTARGET) - -# Fixed test target from PHP 5.5. -test_from_php55: - @if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \ - INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \ - if test "$$INI_FILE"; then \ - $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \ - else \ - echo > $(top_builddir)/tmp-php.ini; \ - fi; \ - INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \ - if test "$$INI_SCANNED_PATH"; then \ - INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \ - $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \ - fi; \ - TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \ - TEST_PHP_SRCDIR=$(top_srcdir) \ - CC="$(CC)" \ - $(PHP_EXECUTABLE) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \ - TEST_RESULT_EXIT_CODE=$$?; \ - rm $(top_builddir)/tmp-php.ini; \ - exit $$TEST_RESULT_EXIT_CODE; \ - else \ - echo "ERROR: Cannot run tests without CLI sapi."; \ - fi diff --git a/extension/gen_tree.rb b/extension/gen_tree.rb deleted file mode 100644 index b2e76ef..0000000 --- a/extension/gen_tree.rb +++ /dev/null @@ -1,110 +0,0 @@ -# Don't forget to change QUANTA_MON_MAX_MONITORED_FUNCTIONS. -# It must be equal to the last entry ([x] = NULL) + 1 - -# put that in the optimal way -methods = { - 15 => 'Magento\Framework\App\Bootstrap::run', - 6 => 'Magento\Framework\App\Bootstrap::create', - 7 => 'Magento\Framework\App\Bootstrap::createApplication', - 5 => '',#'Magento\Framework\Interception\Config\Config::initialize', - 0 => 'Magento\Framework\App\Request\Http::getFrontName', - 16 => '', - 17 => '', - 13 => 'Magento\Framework\App\FrontController\Interceptor::dispatch', - 12 => 'Magento\Framework\App\Action\Action::dispatch', - 1 => '',#'Magento\Framework\View\Page\Builder::generateLayoutBlocks', - 14 => 'Magento\Framework\View\Result\Page\Interceptor::renderResult', - 18 => '', - 3 => 'Magento\Framework\App\Response\Http\Interceptor::sendResponse', - 19 => '', - 20 => '', - 4 => 'Magento\Framework\View\Layout::_renderBlock', - 9 => 'PDOStatement::execute', - 10 => 'Magento\Backend\Controller\Adminhtml\Cache\FlushAll::execute', - 8 => 'Magento\Framework\App\Cache\TypeList::cleanType', - 11 => 'Magento\Backend\Controller\Adminhtml\Cache\FlushSystem::execute', - 21 => 'Magento\Indexer\Model\Indexer::reindexAll', - 22 => '' -} - -def compute_functions methods - methods.each_with_index.reduce Hash.new do |functions, ((order, method), index)| - next functions if method.empty? - klass, function_name = method.split '::' - (functions[function_name] ||= []).push class_name: klass, index: index, order: order - functions[function_name].sort_by { |function| function[:order] } - functions - end.sort_by do |function_name, functions| - functions.min { |function| function[:order] }[:order] - end -end - -def insert_into_tree node, string, value - i = 0 - n = string.length - while i < n && node[:children][string[i]] - node = node[:children][string[i]] - i += 1 - end - while i < n - node = node[:children][string[i]] = {children: {}, value: value} - i += 1 - end - node[:children]['\\0'] = {children: {}, value: value} -end - -def create_tree functions - functions.reduce({children: {}, value: nil}) do |tree, (function, klasses)| - insert_into_tree tree, function, klasses - tree - end -end - -def indent length - ' ' * (length + 1) -end - -def print depth, text - puts "#{indent depth}#{text}" -end - -def compile_node node, depth = 0 - if node[:children].empty? - print depth, "++hp_globals.internal_match_counters.function;" - print depth, "const char *class_name = hp_get_class_name(data TSRMLS_CC);"; - print depth, "if (!class_name) return -1;" - node[:value].each do |value| - print depth, "if (!strcmp(class_name, \"#{value[:class_name].gsub '\\', '\\\\\\\\'}\")) return #{value[:index]};" - end - print depth, "++hp_globals.internal_match_counters.class_unmatched;" - end - node[:children].each do |letter, child| - print depth, "if (function_name[#{depth}] == '#{letter}') {" - compile_node child, depth + 1 - print depth, '}' - end - print depth, "return -1;" -end - -def compile_tree tree - puts "int hp_match_monitored_function(const char* function_name, zend_execute_data* data TSRMLS_DC) {" - puts " ++hp_globals.internal_match_counters.total;" - compile_node tree - puts "}" -end - -def compile_fill methods - puts "#include \"quanta_mon.h\"" - puts - puts "void hp_fill_monitored_functions(char **function_names) {" - puts " if (function_names[0] != NULL) return;" - methods.each_with_index do |(__, method), index| - puts " function_names[#{index}] = \"#{method.gsub '\\', '\\\\\\\\'}\";"; - end - puts " function_names[#{methods.length}] = NULL;" - puts "}" - puts -end - -compile_fill methods -compile_tree create_tree compute_functions methods diff --git a/extension/old_metrics.txt b/extension/old_metrics.txt deleted file mode 100644 index 6a38a8f..0000000 --- a/extension/old_metrics.txt +++ /dev/null @@ -1,141 +0,0 @@ - -#define PROF_STARTS(i) i, -1 -#define PROF_STOPS(i) -1, i - -static const struct { - char *name; - int8_t starts_a; - int8_t stops_a; - int8_t starts_b; - int8_t stops_b; -} magento1_metrics[] = { - {"loading", PROF_STARTS(0), PROF_STARTS(8)}, - {"before_init_config", PROF_STARTS(0), PROF_STARTS(1)}, - {"init_config", PROF_STARTS(1), PROF_STOPS(1)}, - {"init_cache", PROF_STARTS(2), PROF_STOPS(2)}, - {"load_modules", PROF_STARTS(3), PROF_STOPS(4)}, - {"db_updates", PROF_STARTS(5), PROF_STOPS(5)}, - {"load_db", PROF_STARTS(6), PROF_STOPS(6)}, - {"init_stores", PROF_STARTS(7), PROF_STOPS(7)}, - {"routing", PROF_STOPS(7), PROF_STARTS(8)}, - {"controller", PROF_STARTS(8), PROF_STOPS(11)}, - {"before_layout_loading", PROF_STARTS(8), PROF_STARTS(9)}, - {"layout_loading", PROF_STARTS(9), PROF_STOPS(9)}, - {"between_layout_loading_and_rendering", PROF_STOPS(9), PROF_STARTS(10)}, - {"layout_rendering", PROF_STARTS(10), PROF_STOPS(10)}, - {"after_layout_rendering", PROF_STOPS(10), PROF_STOPS(11)}, - {"before_sending_response", PROF_STOPS(11), PROF_STARTS(12)}, - {"total", PROF_STARTS(0), PROF_STOPS(0)}, - {"before_magento", PROF_STARTS(POS_ENTRY_PHP_TOTAL), PROF_STARTS(0)}, - {"after_magento", PROF_STOPS(0), PROF_STOPS(POS_ENTRY_PHP_TOTAL)}, - {"php_total", PROF_STARTS(POS_ENTRY_PHP_TOTAL), PROF_STOPS(POS_ENTRY_PHP_TOTAL)}, - {0} -}; - -static const struct { - char *name; - int8_t starts_a; - int8_t stops_a; - int8_t starts_b; - int8_t stops_b; -} magento_metrics[] = { - {"create_bootstrap", PROF_STARTS(1), PROF_STOPS(1)}, - {"create_application", PROF_STARTS(2), PROF_STOPS(2)}, - {"after_create_application", PROF_STOPS(2), PROF_STARTS(4)}, - // {"before_init_config", PROF_STARTS(2), PROF_STARTS(3)}, - // {"init_config", PROF_STARTS(3), PROF_STOPS(3)}, - // {"after_init_config", PROF_STOPS(3), PROF_STARTS(4)}, - {"parse_request", PROF_STARTS(4), PROF_STOPS(4)}, - {"configure_area", PROF_STOPS(4), PROF_STARTS(7)}, - {"loading", PROF_STARTS(1), PROF_STARTS(7)}, - - {"dispatch", PROF_STARTS(7), PROF_STOPS(7)}, - {"routing", PROF_STARTS(7), PROF_STARTS(8)}, - {"controller", PROF_STARTS(8), PROF_STOPS(8)}, - // {"before_layout_loading", PROF_STARTS(8), PROF_STARTS(9)}, - // {"layout_loading", PROF_STARTS(9), PROF_STOPS(9)}, - // {"between_layout_loading_and_rendering", PROF_STOPS(9), PROF_STARTS(10)}, - {"between_controller_and_layout_rendering", PROF_STOPS(8), PROF_STARTS(10)}, - {"layout_rendering", PROF_STARTS(10), PROF_STOPS(10)}, - - {"before_sending_response", PROF_STOPS(10), PROF_STARTS(12)}, - {"sending_response", PROF_STARTS(12), PROF_STOPS(12)}, - {"total", PROF_STARTS(1), PROF_STOPS(0)}, - {"before_magento", PROF_STARTS(POS_ENTRY_PHP_TOTAL), PROF_STARTS(1)}, - {"after_magento", PROF_STOPS(0), PROF_STOPS(POS_ENTRY_PHP_TOTAL)}, - {"php_total", PROF_STARTS(POS_ENTRY_PHP_TOTAL), PROF_STOPS(POS_ENTRY_PHP_TOTAL)}, - {0} -}; - -void hp_get_monitored_functions_fill() { - /* Already initialized ? */ - if (hp_globals.monitored_function_names[0][0] != NULL) { - return; - } - hp_globals.monitored_function_names[0][0] = "Mage::run"; - hp_globals.monitored_function_names[0][1] = "Mage_Core_Model_App::_initBaseConfig"; - hp_globals.monitored_function_names[0][2] = "Mage_Core_Model_App::_initCache"; - hp_globals.monitored_function_names[0][3] = "Mage_Core_Model_Config::loadModulesCache"; - hp_globals.monitored_function_names[0][4] = "Mage_Core_Model_Config::loadModules"; - hp_globals.monitored_function_names[0][5] = "Mage_Core_Model_Resource_Setup::applyAllUpdates"; - hp_globals.monitored_function_names[0][6] = "Mage_Core_Model_Config::loadDb"; - hp_globals.monitored_function_names[0][7] = "Mage_Core_Model_App::_initStores"; - - hp_globals.monitored_function_names[0][8] = "Mage_Core_Controller_Varien_Action::preDispatch"; - hp_globals.monitored_function_names[0][9] = "Mage_Core_Controller_Varien_Action::loadLayoutUpdates"; - hp_globals.monitored_function_names[0][10] = "Mage_Core_Controller_Varien_Action::renderLayout"; - hp_globals.monitored_function_names[0][11] = "Mage_Core_Controller_Varien_Action::postDispatch"; - hp_globals.monitored_function_names[0][12] = "Mage_Core_Controller_Response_Http::sendResponse"; - - hp_globals.monitored_function_names[0][13] = ""; - hp_globals.monitored_function_names[0][14] = ""; - hp_globals.monitored_function_names[0][15] = "Mage_Core_Block_Abstract::toHtml"; - - hp_globals.monitored_function_names[0][16] = "PDOStatement::execute"; - - /* POS_ENTRY_EVENTS_ONLY */ - hp_globals.monitored_function_names[0][17] = "Mage_Core_Model_Cache::flush"; - hp_globals.monitored_function_names[0][18] = "Mage_Core_Model_Cache::cleanType"; - hp_globals.monitored_function_names[0][19] = "Mage_Adminhtml_CacheController::flushSystemAction"; - hp_globals.monitored_function_names[0][20] = "Mage_Index_Model_Event::_beforeSave"; - hp_globals.monitored_function_names[0][21] = ""; // PHP total time - hp_globals.monitored_function_names[0][22] = NULL; - - - - // MAGENTO 2 - // Allowed metrics for debug: 2,3,5,6,7 - hp_globals.monitored_function_names[1][0] = "Magento\\Framework\\App\\Bootstrap::run"; - //TODO! Maybe split: load scopes, load plugins ? - hp_globals.monitored_function_names[1][1] = "Magento\\Framework\\App\\Bootstrap::create"; - hp_globals.monitored_function_names[1][2] = "Magento\\Framework\\App\\Bootstrap::createApplication"; - hp_globals.monitored_function_names[1][3] = "Magento\\Framework\\Interception\\Config\\Config::initialize"; - hp_globals.monitored_function_names[1][4] = "Magento\\Framework\\App\\Request\\Http::getFrontName"; - hp_globals.monitored_function_names[1][5] = ""; - hp_globals.monitored_function_names[1][6] = ""; - hp_globals.monitored_function_names[1][7] = "Magento\\Framework\\App\\FrontController\\Interceptor::dispatch"; - - hp_globals.monitored_function_names[1][8] = "Magento\\Framework\\App\\Action\\Action::dispatch"; - // hp_globals.monitored_function_names[1][9] = "Magento\\Framework\\View\\Page\\Builder::loadLayoutUpdates"; TODO! Never called ? - hp_globals.monitored_function_names[1][9] = "Magento\\Framework\\View\\Page\\Builder::generateLayoutBlocks"; - hp_globals.monitored_function_names[1][10] = "Magento\\Framework\\View\\Result\\Page\\Interceptor::renderResult"; - hp_globals.monitored_function_names[1][11] = ""; - // hp_globals.monitored_function_names[1][11] = "Magento\\Framework\\View\\Page\\Builder::generateLayoutXml"; //TODO! Check what it dows - hp_globals.monitored_function_names[1][12] = "Magento\\Framework\\App\\Response\\Http\\Interceptor::sendResponse"; - - hp_globals.monitored_function_names[1][13] = ""; - hp_globals.monitored_function_names[1][14] = ""; - hp_globals.monitored_function_names[1][15] = "Magento\\Framework\\View\\Layout::_renderBlock"; - - hp_globals.monitored_function_names[1][16] = "PDOStatement::execute"; - - /* POS_ENTRY_EVENTS_ONLY */ - hp_globals.monitored_function_names[1][17] = "Magento\\Backend\\Controller\\Adminhtml\\Cache\\FlushAll::execute"; - hp_globals.monitored_function_names[1][18] = "Magento\\Framework\\App\\Cache\\TypeList::cleanType"; - hp_globals.monitored_function_names[1][19] = "Magento\\Backend\\Controller\\Adminhtml\\Cache\\FlushSystem::execute"; - hp_globals.monitored_function_names[1][20] = ""; - hp_globals.monitored_function_names[1][21] = ""; - hp_globals.monitored_function_names[1][22] = NULL; - - // Don't forget to change QUANTA_MON_MAX_MONITORED_FUNCTIONS. It must be equal to the last entry ([x] = NULL) + 1 -} diff --git a/extension/php_quanta_mon.h b/extension/php_quanta_mon.h deleted file mode 100644 index ab16545..0000000 --- a/extension/php_quanta_mon.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2009 Facebook - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef PHP_QUANTA_MON_H -#define PHP_QUANTA_MON_H - -extern zend_module_entry quanta_mon_module_entry; -#define phpext_quanta_mon_ptr &quanta_mon_module_entry - -#ifdef PHP_WIN32 -#define PHP_QUANTA_MON_API __declspec(dllexport) -#else -#define PHP_QUANTA_MON_API -#endif - -#ifdef ZTS -#include "TSRM.h" -#endif - -PHP_MINIT_FUNCTION(quanta_mon); -PHP_MSHUTDOWN_FUNCTION(quanta_mon); -PHP_RINIT_FUNCTION(quanta_mon); -PHP_RSHUTDOWN_FUNCTION(quanta_mon); -PHP_MINFO_FUNCTION(quanta_mon); -// -// PHP_FUNCTION(quanta_mon_enable); -// PHP_FUNCTION(quanta_mon_disable); - -#endif /* PHP_QUANTA_MON_H */ diff --git a/extension/quanta_mon.orig.c b/extension/quanta_mon.orig.c deleted file mode 100644 index 577df96..0000000 --- a/extension/quanta_mon.orig.c +++ /dev/null @@ -1,2873 +0,0 @@ -/* - * Copyright (c) 2009 Facebook - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef linux -/* To enable CPU_ZERO and CPU_SET, etc. */ -//# define _GNU_SOURCE -#endif - -#include "php.h" -#include "php_ini.h" -#include "ext/standard/info.h" -#include "php_quanta_mon.h" -#include "zend_extensions.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef __FreeBSD__ -# if __FreeBSD_version >= 700110 -# include -# include -# define cpu_set_t cpuset_t -# define SET_AFFINITY(pid, size, mask) \ - cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, size, mask) -# define GET_AFFINITY(pid, size, mask) \ - cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, size, mask) -# else -# error "This version of FreeBSD does not support cpusets" -# endif /* __FreeBSD_version */ -#elif __APPLE__ -/* - * Patch for compiling in Mac OS X Leopard - * @author Svilen Spasov - */ -# include -# include -# define cpu_set_t thread_affinity_policy_data_t -# define CPU_SET(cpu_id, new_mask) \ - (*(new_mask)).affinity_tag = (cpu_id + 1) -# define CPU_ZERO(new_mask) \ - (*(new_mask)).affinity_tag = THREAD_AFFINITY_TAG_NULL -# define SET_AFFINITY(pid, size, mask) \ - thread_policy_set(mach_thread_self(), THREAD_AFFINITY_POLICY, mask, \ - THREAD_AFFINITY_POLICY_COUNT) -#else -/* For sched_getaffinity, sched_setaffinity */ -# include -# define SET_AFFINITY(pid, size, mask) sched_setaffinity(0, size, mask) -# define GET_AFFINITY(pid, size, mask) sched_getaffinity(0, size, mask) -#endif /* __FreeBSD__ */ - - - -/** - * ********************** - * GLOBAL MACRO CONSTANTS - * ********************** - */ - -/* QuantaMon version */ -#define QUANTA_MON_VERSION "0.9.2" -/* Set the following cookie for enabling full monitoring. The cookie value - * should be modified for each customers, maybe moved to a configuration file */ -#define DEBUG_QUANTA - -#ifdef DEBUG_QUANTA - #define PRINTF_QUANTA printf -#else - #define PRINTF_QUANTA dummy -#endif -static void dummy(char *unused, ...) -{ - return; -} - -/* Fictitious function name to represent top of the call tree. The paranthesis - * in the name is to ensure we don't conflict with user function names. */ -#define ROOT_SYMBOL "main()" - -/* Size of a temp scratch buffer */ -#define SCRATCH_BUF_LEN 512 - -/* Various QUANTA_MON modes. If you are adding a new mode, register the appropriate - * callbacks in hp_begin() */ -#define QUANTA_MON_MODE_HIERARCHICAL 1 /* Complete profiling of every single PHP calls */ -#define QUANTA_MON_MODE_SAMPLED 2 /* Statistical sample of most PHP calls */ -#define QUANTA_MON_MODE_MAGENTO_PROFILING 3 /* Profiling of selected Magento calls (see hp_get_monitored_functions_fill) */ -#define QUANTA_MON_MODE_EVENTS_ONLY 4 /* No profiling, deal only with calls >= POS_ENTRY_EVENTS_ONLY */ - -/* Hierarchical profiling flags. - * - * Note: Function call counts and wall (elapsed) time are always profiled. - * The following optional flags can be used to control other aspects of - * profiling. - */ -#define QUANTA_MON_FLAGS_NO_BUILTINS 0x0001 /* do not profile builtins */ -#define QUANTA_MON_FLAGS_CPU 0x0002 /* gather CPU times for funcs */ -#define QUANTA_MON_FLAGS_MEMORY 0x0004 /* gather memory usage for funcs */ - -/* Constants for QUANTA_MON_MODE_SAMPLED */ -#define QUANTA_MON_SAMPLING_INTERVAL 100000 /* In microsecs */ - -/* Constant for ignoring functions, transparent to hierarchical profile */ -#define QUANTA_MON_MAX_IGNORED_FUNCTIONS 256 -#define QUANTA_MON_IGNORED_FUNCTION_FILTER_SIZE \ - ((QUANTA_MON_MAX_IGNORED_FUNCTIONS + 7)/8) - -#define QUANTA_EXTRA_CHECKS -#define QUANTA_MON_MAX_MONITORED_FUNCTIONS_HASH 256 -#define QUANTA_MON_MAX_MONITORED_FUNCTIONS 13 -#define QUANTA_MON_MONITORED_FUNCTION_FILTER_SIZE \ - ((QUANTA_MON_MAX_MONITORED_FUNCTIONS_HASH + 7)/8) - -#if !defined(uint64) -typedef unsigned long long uint64; -#endif -#if !defined(uint32) -typedef unsigned int uint32; -#endif -#if !defined(uint8) -typedef unsigned char uint8; -#endif - - -/** - * ***************************** - * GLOBAL DATATYPES AND TYPEDEFS - * ***************************** - */ - -/* QuantaMon maintains a stack of entries being profiled. The memory for the entry - * is passed by the layer that invokes BEGIN_PROFILING(), e.g. the hp_execute() - * function. Often, this is just C-stack memory. - * - * This structure is a convenient place to track start time of a particular - * profile operation, recursion depth, and the name of the function being - * profiled. */ -typedef struct hp_entry_t { - char *name_hprof; /* function name */ - char *pathname_hprof; /* path of the file */ - int rlvl_hprof; /* recursion level for function */ - uint64 tsc_start; /* start value for TSC counter */ - long int mu_start_hprof; /* memory usage */ - long int pmu_start_hprof; /* peak memory usage */ - struct rusage ru_start_hprof; /* user/sys time start */ - struct hp_entry_t *prev_hprof; /* ptr to prev entry being profiled */ - uint8 hash_code; /* hash_code for the function name */ -} hp_entry_t; - -/* Various types for QUANTA_MON callbacks */ -typedef void (*hp_init_cb) (TSRMLS_D); -typedef void (*hp_exit_cb) (TSRMLS_D); -typedef void (*hp_begin_function_cb) (hp_entry_t **entries, - hp_entry_t *current TSRMLS_DC); -typedef void (*hp_end_function_cb) (hp_entry_t **entries TSRMLS_DC); - -/* Struct to hold the various callbacks for a single quanta_mon mode */ -typedef struct hp_mode_cb { - hp_init_cb init_cb; - hp_exit_cb exit_cb; - hp_begin_function_cb begin_fn_cb; - hp_end_function_cb end_fn_cb; -} hp_mode_cb; - -typedef struct generate_renderize_block_details_t { - uint64 tsc_generate_start; - uint64 tsc_generate_stop; - uint64 tsc_renderize_first_start; /* Might be re-entrant, record the first call */ - uint64 tsc_renderize_last_stop; /* Always record the latest timestamp */ - char *type; - char *name; - char *class; - char *template; - struct generate_renderize_block_details_t *next_generate_renderize_block_detail; -} generate_renderize_block_details; - -/* Xhprof's global state. - * - * This structure is instantiated once. Initialize defaults for attributes in - * hp_init_profiler_state() Cleanup/free attributes in - * hp_clean_profiler_state() */ -typedef struct hp_global_t { - - /* ---------- Global attributes: ----------- */ - - /* Indicates if quanta_mon is currently enabled */ - int enabled; - - /* Indicates if quanta_mon was ever enabled during this request */ - int ever_enabled; - - /* Holds all the quanta_mon statistics */ - zval *stats_count; - - /* Indicates the current quanta_mon mode or level */ - int profiler_level; - - /* Top of the profile stack */ - hp_entry_t *entries; - - /* freelist of hp_entry_t chunks for reuse... */ - hp_entry_t *entry_free_list; - - /* Callbacks for various quanta_mon modes */ - hp_mode_cb mode_cb; - - /* Cookie value that must be received for enabling full profiling (all PHP calls, like xhprof) */ - char *full_profiling_cookie_trigger; - - /* Cookie value that must be received for enabling magento profiling (Magento calls listed in hp_get_monitored_functions_fill) */ - char *magento_profiling_cookie_trigger; - - /* Path of the forwarding agent */ - char *path_quanta_agent_exe; - - /* Path of the quanta agent unix socket */ - char *path_quanta_agent_socket; - - /* ---------- Mode specific attributes: ----------- */ - - /* Global to track the time of the last sample in time and ticks */ - struct timeval last_sample_time; - uint64 last_sample_tsc; - /* QUANTA_MON_SAMPLING_INTERVAL in ticks */ - uint64 sampling_interval_tsc; - - /* This array is used to store cpu frequencies for all available logical - * cpus. For now, we assume the cpu frequencies will not change for power - * saving or other reasons. If we need to worry about that in the future, we - * can use a periodical timer to re-calculate this arrary every once in a - * while (for example, every 1 or 5 seconds). */ - double *cpu_frequencies; - - /* The number of logical CPUs this machine has. */ - uint32 cpu_num; - - /* The saved cpu affinity. */ - cpu_set_t prev_mask; - - /* The cpu id current process is bound to. (default 0) */ - uint32 cur_cpu_id; - - /* QuantaMon flags */ - uint32 quanta_mon_flags; - - /* counter table indexed by hash value of function names. */ - uint8 func_hash_counters[256]; - - /* Table of ignored function names and their filter */ - char **ignored_function_names; - uint8 ignored_function_filter[QUANTA_MON_IGNORED_FUNCTION_FILTER_SIZE]; - - /* Table of monitored function names and their filter */ - char *monitored_function_names[QUANTA_MON_MAX_MONITORED_FUNCTIONS]; - uint8 monitored_function_filter[QUANTA_MON_MONITORED_FUNCTION_FILTER_SIZE]; - uint64 monitored_function_tsc_start[QUANTA_MON_MAX_MONITORED_FUNCTIONS]; - uint64 monitored_function_tsc_stop[QUANTA_MON_MAX_MONITORED_FUNCTIONS]; - generate_renderize_block_details *monitored_function_generate_renderize_block_first_linked_list; - generate_renderize_block_details *monitored_function_generate_renderize_block_last_linked_list; - generate_renderize_block_details *renderize_block_last_used; - uint32 quanta_dbg; - -} hp_global_t; - - -/** - * *********************** - * GLOBAL STATIC VARIABLES - * *********************** - */ -/* QuantaMon global state */ -static hp_global_t hp_globals; - -#if PHP_VERSION_ID < 50500 -/* Pointer to the original execute function */ -static ZEND_DLEXPORT void (*_zend_execute) (zend_op_array *ops TSRMLS_DC); - -/* Pointer to the origianl execute_internal function */ -static ZEND_DLEXPORT void (*_zend_execute_internal) (zend_execute_data *data, - int ret TSRMLS_DC); -#else -/* Pointer to the original execute function */ -static void (*_zend_execute_ex) (zend_execute_data *execute_data TSRMLS_DC); - -/* Pointer to the origianl execute_internal function */ -static void (*_zend_execute_internal) (zend_execute_data *data, - struct _zend_fcall_info *fci, int ret TSRMLS_DC); -#endif - -/* Pointer to the original compile function */ -static zend_op_array * (*_zend_compile_file) (zend_file_handle *file_handle, - int type TSRMLS_DC); - -/* Pointer to the original compile string function (used by eval) */ -static zend_op_array * (*_zend_compile_string) (zval *source_string, char *filename TSRMLS_DC); - -/* Bloom filter for function names to be ignored */ -#define INDEX_2_BYTE(index) (index >> 3) -#define INDEX_2_BIT(index) (1 << (index & 0x7)); - - -/** - * **************************** - * STATIC FUNCTION DECLARATIONS - * **************************** - */ -static void hp_register_constants(INIT_FUNC_ARGS); - -static void hp_begin(long level, long quanta_mon_flags TSRMLS_DC); -static void hp_stop(TSRMLS_D); -static void hp_end(TSRMLS_D); - -static inline uint64 cycle_timer(); -static double get_cpu_frequency(); -static void clear_frequencies(); - -static void hp_free_the_free_list(); -static hp_entry_t *hp_fast_alloc_hprof_entry(); -static void hp_fast_free_hprof_entry(hp_entry_t *p); -static inline uint8 hp_inline_hash(char * str); -static void get_all_cpu_frequencies(); -static long get_us_interval(struct timeval *start, struct timeval *end); -static void incr_us_interval(struct timeval *start, uint64 incr); - -static void hp_get_ignored_functions_from_arg(zval *args); -static void hp_get_monitored_functions_fill(); -static void hp_ignored_functions_filter_clear(); -static void hp_ignored_functions_filter_init(); - -static void hp_monitored_functions_filter_clear(); -static void hp_monitored_functions_filter_init(); - -static inline zval *hp_zval_at_key(char *key, - zval *values); -static inline char **hp_strings_in_zval(zval *values); -static inline void hp_array_del(char **name_array); - -/* {{{ arginfo */ -ZEND_BEGIN_ARG_INFO_EX(arginfo_quanta_mon_enable, 0, 0, 0) - ZEND_ARG_INFO(0, flags) - ZEND_ARG_INFO(0, options) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_quanta_mon_disable, 0) -ZEND_END_ARG_INFO() - -/* }}} */ - -/** - * ********************* - * FUNCTION PROTOTYPES - * ********************* - */ -int restore_cpu_affinity(cpu_set_t * prev_mask); -int bind_to_cpu(uint32 cpu_id); - -/** - * ********************* - * PHP EXTENSION GLOBALS - * ********************* - */ -/* List of functions implemented/exposed by quanta_mon */ -zend_function_entry quanta_mon_functions[] = { - PHP_FE(quanta_mon_enable, arginfo_quanta_mon_enable) - PHP_FE(quanta_mon_disable, arginfo_quanta_mon_disable) - {NULL, NULL, NULL} -}; - -/* Callback functions for the quanta_mon extension */ -zend_module_entry quanta_mon_module_entry = { -#if ZEND_MODULE_API_NO >= 20010901 - STANDARD_MODULE_HEADER, -#endif - "quanta_mon", /* Name of the extension */ - quanta_mon_functions, /* List of functions exposed */ - PHP_MINIT(quanta_mon), /* Module init callback */ - PHP_MSHUTDOWN(quanta_mon), /* Module shutdown callback */ - PHP_RINIT(quanta_mon), /* Request init callback */ - PHP_RSHUTDOWN(quanta_mon), /* Request shutdown callback */ - PHP_MINFO(quanta_mon), /* Module info callback */ -#if ZEND_MODULE_API_NO >= 20010901 - QUANTA_MON_VERSION, -#endif - STANDARD_MODULE_PROPERTIES -}; - -PHP_INI_BEGIN() - -/* output directory: - * Currently this is not used by the extension itself. - * But some implementations of iQuantaMonRuns interface might - * choose to save/restore QuantaMon profiler runs in the - * directory specified by this ini setting. - */ -PHP_INI_ENTRY("quanta_mon.full_profiling_cookie_trigger", "", PHP_INI_SYSTEM, NULL) -PHP_INI_ENTRY("quanta_mon.magento_profiling_cookie_trigger", "", PHP_INI_SYSTEM, NULL) -PHP_INI_ENTRY("quanta_mon.path_quanta_agent_exe", "", PHP_INI_SYSTEM, NULL) -PHP_INI_ENTRY("quanta_mon.path_quanta_agent_socket", "", PHP_INI_SYSTEM, NULL) - -PHP_INI_END() - -/* Init module */ -ZEND_GET_MODULE(quanta_mon) - - -/** - * ********************************** - * PHP EXTENSION FUNCTION DEFINITIONS - * ********************************** - */ - -/** - * Start QuantaMon profiling in hierarchical mode. - * - * @param long $flags flags for hierarchical mode - * @return void - * @author kannan - */ -PHP_FUNCTION(quanta_mon_enable) { - /* The module is now activated at each request, this function is no longer used. */ -} - -/** - * Stops QuantaMon from profiling in hierarchical mode anymore and returns the - * profile info. - * - * @param void - * @return array hash-array of QuantaMon's profile info - * @author kannan, hzhao - */ -PHP_FUNCTION(quanta_mon_disable) { - /* Like quanta_mon_enable, this function is longer used. */ -} - -/** - * Module init callback. - * Called during Apache startup - * @author cjiang - */ -PHP_MINIT_FUNCTION(quanta_mon) { - int i; - - REGISTER_INI_ENTRIES(); - - hp_globals.full_profiling_cookie_trigger = INI_STR("quanta_mon.full_profiling_cookie_trigger"); - if ((!hp_globals.full_profiling_cookie_trigger) || (strlen(hp_globals.full_profiling_cookie_trigger) < 4)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "quanta_mon.full_profiling_cookie_trigger configuration missing or invalid. Module disabled."); - return FAILURE; - } - - hp_globals.magento_profiling_cookie_trigger = INI_STR("quanta_mon.magento_profiling_cookie_trigger"); - if ((!hp_globals.magento_profiling_cookie_trigger) || (strlen(hp_globals.magento_profiling_cookie_trigger) < 4)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "quanta_mon.magento_profiling_cookie_trigger configuration missing or invalid. Module disabled."); - return FAILURE; - } - - hp_globals.path_quanta_agent_exe = INI_STR("quanta_mon.path_quanta_agent_exe"); - if ((!hp_globals.path_quanta_agent_exe) || (strlen(hp_globals.path_quanta_agent_exe) < 4)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "quanta_mon.path_quanta_agent_exe configuration missing or invalid. Module disabled."); - return FAILURE; - } - - hp_globals.path_quanta_agent_socket = INI_STR("quanta_mon.path_quanta_agent_socket"); - if ((!hp_globals.path_quanta_agent_socket) || (strlen(hp_globals.path_quanta_agent_socket) < 4)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "quanta_mon.path_quanta_agent_socket configuration missing or invalid. Module disabled."); - return FAILURE; - } - - hp_register_constants(INIT_FUNC_ARGS_PASSTHRU); - - /* Get the number of available logical CPUs. */ - hp_globals.cpu_num = sysconf(_SC_NPROCESSORS_CONF); - - /* Get the cpu affinity mask. */ -#ifndef __APPLE__ - if (GET_AFFINITY(0, sizeof(cpu_set_t), &hp_globals.prev_mask) < 0) { - perror("getaffinity"); - return FAILURE; - } -#else - CPU_ZERO(&(hp_globals.prev_mask)); -#endif - - /* Initialize cpu_frequencies and cur_cpu_id. */ - hp_globals.cpu_frequencies = NULL; - hp_globals.cur_cpu_id = 0; - - hp_globals.stats_count = NULL; - - /* no free hp_entry_t structures to start with */ - hp_globals.entry_free_list = NULL; - - for (i = 0; i < 256; i++) { - hp_globals.func_hash_counters[i] = 0; - } - - hp_ignored_functions_filter_clear(); - hp_monitored_functions_filter_clear(); - -#if defined(DEBUG) - /* To make it random number generator repeatable to ease testing. */ - srand(0); -#endif - return SUCCESS; -} - -/** - * Module shutdown callback. - */ -PHP_MSHUTDOWN_FUNCTION(quanta_mon) { - /* Make sure cpu_frequencies is free'ed. */ - clear_frequencies(); - - /* free any remaining items in the free list */ - hp_free_the_free_list(); - - UNREGISTER_INI_ENTRIES(); - - return SUCCESS; -} - -/** - * Request init callback. - */ -PHP_RINIT_FUNCTION(quanta_mon) { -// xxx VERIFIER qu'on puisse bien faire un hp_begin avec des param differents -// a chaque appel -// puis remplir hp_mode_evnets_only_beginfn_cb - int mode; - long quanta_mon_flags = 0; /* QuantaMon flags */ - zval *optional_array = NULL; /* optional array arg: for future use */ - char *cookie_data = SG(request_info).cookie_data; - - if (cookie_data && strstr(cookie_data, hp_globals.full_profiling_cookie_trigger)) - mode = QUANTA_MON_MODE_HIERARCHICAL; - else if (cookie_data && strstr(cookie_data, hp_globals.magento_profiling_cookie_trigger)) - mode = QUANTA_MON_MODE_MAGENTO_PROFILING; - else - mode = QUANTA_MON_MODE_EVENTS_ONLY; - - hp_get_ignored_functions_from_arg(optional_array); - hp_get_monitored_functions_fill(); - - hp_begin(mode, quanta_mon_flags TSRMLS_CC); - - return SUCCESS; -} - -/** - * Request shutdown callback. Stop profiling and return. - */ -PHP_RSHUTDOWN_FUNCTION(quanta_mon) { - hp_end(TSRMLS_C); - return SUCCESS; -} - -/** - * Module info callback. Returns the quanta_mon version. - */ -PHP_MINFO_FUNCTION(quanta_mon) -{ - char buf[SCRATCH_BUF_LEN]; - char tmp[SCRATCH_BUF_LEN]; - int i; - int len; - - php_info_print_table_start(); - php_info_print_table_header(2, "quanta_mon", QUANTA_MON_VERSION); - len = snprintf(buf, SCRATCH_BUF_LEN, "%d", hp_globals.cpu_num); - buf[len] = 0; - php_info_print_table_header(2, "CPU num", buf); - - if (hp_globals.cpu_frequencies) { - /* Print available cpu frequencies here. */ - php_info_print_table_header(2, "CPU logical id", " Clock Rate (MHz) "); - for (i = 0; i < hp_globals.cpu_num; ++i) { - len = snprintf(buf, SCRATCH_BUF_LEN, " CPU %d ", i); - buf[len] = 0; - len = snprintf(tmp, SCRATCH_BUF_LEN, "%f", hp_globals.cpu_frequencies[i]); - tmp[len] = 0; - php_info_print_table_row(2, buf, tmp); - } - } - - php_info_print_table_end(); -} - - -/** - * *************************************************** - * COMMON HELPER FUNCTION DEFINITIONS AND LOCAL MACROS - * *************************************************** - */ - -static void hp_register_constants(INIT_FUNC_ARGS) { - REGISTER_LONG_CONSTANT("QUANTA_MON_FLAGS_NO_BUILTINS", - QUANTA_MON_FLAGS_NO_BUILTINS, - CONST_CS | CONST_PERSISTENT); - - REGISTER_LONG_CONSTANT("QUANTA_MON_FLAGS_CPU", - QUANTA_MON_FLAGS_CPU, - CONST_CS | CONST_PERSISTENT); - - REGISTER_LONG_CONSTANT("QUANTA_MON_FLAGS_MEMORY", - QUANTA_MON_FLAGS_MEMORY, - CONST_CS | CONST_PERSISTENT); -} - -/** - * A hash function to calculate a 8-bit hash code for a function name. - * This is based on a small modification to 'zend_inline_hash_func' by summing - * up all bytes of the ulong returned by 'zend_inline_hash_func'. - * - * @param str, char *, string to be calculated hash code for. - * - * @author cjiang - */ -static inline uint8 hp_inline_hash(char * str) { - ulong h = 5381; - uint i = 0; - uint8 res = 0; - - while (*str) { - h += (h << 5); - h ^= (ulong) *str++; - } - - for (i = 0; i < sizeof(ulong); i++) { - res += ((uint8 *)&h)[i]; - } - return res; -} - -/** - * Parse the list of ignored functions from the zval argument. - * - * @author mpal - */ -static void hp_get_ignored_functions_from_arg(zval *args) { - - if (hp_globals.ignored_function_names) { - hp_array_del(hp_globals.ignored_function_names); - } - - if (args != NULL) { - zval *zresult = NULL; - - zresult = hp_zval_at_key("ignored_functions", args); - hp_globals.ignored_function_names = hp_strings_in_zval(zresult); - } else { - hp_globals.ignored_function_names = NULL; - } -} - -/** - * Clear filter for functions which may be ignored during profiling. - * - * @author mpal - */ -static void hp_ignored_functions_filter_clear() { - memset(hp_globals.ignored_function_filter, 0, - QUANTA_MON_IGNORED_FUNCTION_FILTER_SIZE); -} - -/** - * Initialize filter for ignored functions using bit vector. - * - * @author mpal - */ -static void hp_ignored_functions_filter_init() { - if (hp_globals.ignored_function_names != NULL) { - int i = 0; - for(; hp_globals.ignored_function_names[i] != NULL; i++) { - char *str = hp_globals.ignored_function_names[i]; - uint8 hash = hp_inline_hash(str); - int idx = INDEX_2_BYTE(hash); - hp_globals.ignored_function_filter[idx] |= INDEX_2_BIT(hash); - } - } - memset(hp_globals.monitored_function_tsc_start, 0, sizeof(hp_globals.monitored_function_tsc_start)); - memset(hp_globals.monitored_function_tsc_stop, 0, sizeof(hp_globals.monitored_function_tsc_stop)); -} - -/** - * Check if function collides in filter of functions to be ignored. - * - * @author mpal - */ -int hp_ignored_functions_filter_collision(uint8 hash) { - uint8 mask = INDEX_2_BIT(hash); - return hp_globals.ignored_function_filter[INDEX_2_BYTE(hash)] & mask; -} - -/* Special handling */ -#define POS_ENTRY_GENERATEBLOCK 6 -#define POS_ENTRY_BEFORETOHTML 7 -#define POS_ENTRY_AFTERTOHTML 8 -#define POS_ENTRY_EVENTS_ONLY 9 /* Anything below won't be processed unless the special cookie is set */ -/** -*/ -/** - * Parse the list of monitored functions from the zval argument. - * - * @author ch - */ -static void hp_get_monitored_functions_fill() { - /* Already initialized ? */ - if (hp_globals.monitored_function_names[0] != NULL) { - return; - } - hp_globals.monitored_function_names[0] = "Mage::run"; - hp_globals.monitored_function_names[1] = "Mage_Core_Controller_Varien_Action::preDispatch"; - hp_globals.monitored_function_names[2] = "Mage_Core_Controller_Varien_Action::loadLayoutUpdates"; - hp_globals.monitored_function_names[3] = "Mage_Core_Controller_Varien_Action::renderLayout"; - hp_globals.monitored_function_names[4] = "Mage_Core_Controller_Varien_Action::postDispatch"; - hp_globals.monitored_function_names[5] = "Mage_Core_Controller_Response_Http::sendResponse"; - hp_globals.monitored_function_names[POS_ENTRY_GENERATEBLOCK] /* 6 */ = "Mage_Core_Model_Layout::_generateBlock"; - hp_globals.monitored_function_names[POS_ENTRY_BEFORETOHTML] /* 7 */ = "Mage_Core_Block_Abstract::_beforeToHtml"; - hp_globals.monitored_function_names[POS_ENTRY_AFTERTOHTML] /* 8 */ = "Mage_Core_Block_Abstract::_afterToHtml"; - /* POS_ENTRY_EVENTS_ONLY */ - hp_globals.monitored_function_names[POS_ENTRY_EVENTS_ONLY] /* 9 */ = "Mage_Core_Model_Cache::flush"; - hp_globals.monitored_function_names[10] /* 10 */ = "Mage_Core_Model_Cache::cleanType"; - hp_globals.monitored_function_names[11] /* 11 */ = "Mage_Index_Model_Event::_beforeSave"; - hp_globals.monitored_function_names[12] = NULL; - // Don't forget to change QUANTA_MON_MAX_MONITORED_FUNCTIONS. It must be equal to the last entry ([x] = NULL) + 1 -} - -/** - * Clear filter for functions which may be ignored during profiling. - * - * @author ch - */ -static void hp_monitored_functions_filter_clear() { - memset(hp_globals.monitored_function_filter, 0, - QUANTA_MON_MONITORED_FUNCTION_FILTER_SIZE); -} - -/** - * Initialize filter for monitored functions using bit vector. - * - * @author ch - */ -static void hp_monitored_functions_filter_init() { - int i = 0; - for(; hp_globals.monitored_function_names[i] != NULL; i++) { - char *str = hp_globals.monitored_function_names[i]; - uint8 hash = hp_inline_hash(str); - int idx = INDEX_2_BYTE(hash); - hp_globals.monitored_function_filter[idx] |= INDEX_2_BIT(hash); - } - hp_globals.monitored_function_generate_renderize_block_first_linked_list = NULL; - hp_globals.renderize_block_last_used = NULL; -} - -/** - * Check if function collides in filter of functions to be monitored - * - * @author ch - */ -int hp_monitored_functions_filter_collision(uint8 hash) { - uint8 mask = INDEX_2_BIT(hash); - return hp_globals.monitored_function_filter[INDEX_2_BYTE(hash)] & mask; -} - - -/** - * Initialize profiler state - * - * @author kannan, veeve - */ -void hp_init_profiler_state(int level TSRMLS_DC) { - /* Setup globals */ - if (!hp_globals.ever_enabled) { - hp_globals.ever_enabled = 1; - hp_globals.entries = NULL; - } - hp_globals.profiler_level = (int) level; - - if (level != QUANTA_MON_MODE_EVENTS_ONLY) { - /* Init stats_count */ - if (hp_globals.stats_count) { - zval_dtor(hp_globals.stats_count); - FREE_ZVAL(hp_globals.stats_count); - } - MAKE_STD_ZVAL(hp_globals.stats_count); - array_init(hp_globals.stats_count); - - /* NOTE(cjiang): some fields such as cpu_frequencies take relatively longer - * to initialize, (5 milisecond per logical cpu right now), therefore we - * calculate them lazily. */ - if (hp_globals.cpu_frequencies == NULL) { - get_all_cpu_frequencies(); - restore_cpu_affinity(&hp_globals.prev_mask); - } - - /* bind to a random cpu so that we can use rdtsc instruction. */ - bind_to_cpu((int) (rand() % hp_globals.cpu_num)); - } - /* Call current mode's init cb */ - hp_globals.mode_cb.init_cb(TSRMLS_C); - - /* Set up filter of functions which may be ignored during profiling */ - hp_ignored_functions_filter_init(); - - /* Set up filter of functions which are monitored */ - hp_monitored_functions_filter_init(); -} - -/** - * Cleanup profiler state - * - * @author kannan, veeve - */ -void hp_clean_profiler_state(TSRMLS_D) { - /* Call current mode's exit cb */ - hp_globals.mode_cb.exit_cb(TSRMLS_C); - - /* Clear globals */ - if (hp_globals.stats_count) { - zval_dtor(hp_globals.stats_count); - FREE_ZVAL(hp_globals.stats_count); - hp_globals.stats_count = NULL; - } - hp_globals.entries = NULL; - hp_globals.profiler_level = 1; - hp_globals.ever_enabled = 0; - - /* Delete the array storing ignored function names */ - hp_array_del(hp_globals.ignored_function_names); - hp_globals.ignored_function_names = NULL; - - /* We don't need to delete the array of monitored function names, - * it's just pointers to static memory, unlike ignored function names - * which are emalloced. - * - * Delete the array storing monitored function names - hp_array_del(hp_globals.monitored_function_names); - hp_globals.monitored_function_names = NULL; - */ -} - -/* - * Start profiling - called just before calling the actual function - * NOTE: PLEASE MAKE SURE TSRMLS_CC IS AVAILABLE IN THE CONTEXT - * OF THE FUNCTION WHERE THIS MACRO IS CALLED. - * TSRMLS_CC CAN BE MADE AVAILABLE VIA TSRMLS_DC IN THE - * CALLING FUNCTION OR BY CALLING TSRMLS_FETCH() - * TSRMLS_FETCH() IS RELATIVELY EXPENSIVE. - * - * return profile_curr with - * -1 if this function is not specifically profiled - * >=0 this function is specifically profiled, in this case contain the array position - */ -#define BEGIN_PROFILING(entries, symbol, profile_curr, pathname, execute_data) \ - do { \ - /* Use a hash code to filter most of the string comparisons. */ \ - uint8 hash_code = hp_inline_hash(symbol); \ - if(hp_ignore_entry(hash_code, symbol)) \ - profile_curr = -1; \ - else \ - profile_curr = qm_record_timers_loading_time(hash_code, symbol, execute_data); \ - if (hp_globals.profiler_level <= QUANTA_MON_MODE_SAMPLED) { \ - hp_entry_t *cur_entry = hp_fast_alloc_hprof_entry(); \ - (cur_entry)->hash_code = hash_code; \ - (cur_entry)->name_hprof = symbol; \ - (cur_entry)->pathname_hprof = pathname; \ - (cur_entry)->prev_hprof = (*(entries)); \ - /* Call the universal callback */ \ - hp_mode_common_beginfn((entries), (cur_entry) TSRMLS_CC); \ - /* Call the mode's beginfn callback */ \ - hp_globals.mode_cb.begin_fn_cb((entries), (cur_entry) TSRMLS_CC); \ - /* Update entries linked list */ \ - (*(entries)) = (cur_entry); \ - } \ - } while (0) - -/* - * Stop profiling - called just after calling the actual function - * NOTE: PLEASE MAKE SURE TSRMLS_CC IS AVAILABLE IN THE CONTEXT - * OF THE FUNCTION WHERE THIS MACRO IS CALLED. - * TSRMLS_CC CAN BE MADE AVAILABLE VIA TSRMLS_DC IN THE - * CALLING FUNCTION OR BY CALLING TSRMLS_FETCH() - * TSRMLS_FETCH() IS RELATIVELY EXPENSIVE. - */ -#define END_PROFILING(entries, profile_curr, execute_data) \ - do { \ - if (profile_curr >= 0) { \ - hp_globals.monitored_function_tsc_stop[profile_curr] = cycle_timer(); \ - if (profile_curr == POS_ENTRY_GENERATEBLOCK) \ - hp_globals.monitored_function_generate_renderize_block_last_linked_list->tsc_generate_stop = hp_globals.monitored_function_tsc_stop[profile_curr]; \ - else if (profile_curr == POS_ENTRY_AFTERTOHTML) \ - qm_after_tohmtl(execute_data); \ - } \ - if (hp_globals.profiler_level <= QUANTA_MON_MODE_SAMPLED) { \ - hp_entry_t *cur_entry; \ - /* Call the mode's endfn callback. */ \ - /* NOTE(cjiang): we want to call this 'end_fn_cb' before */ \ - /* 'hp_mode_common_endfn' to avoid including the time in */ \ - /* 'hp_mode_common_endfn' in the profiling results. */ \ - hp_globals.mode_cb.end_fn_cb((entries) TSRMLS_CC); \ - cur_entry = (*(entries)); \ - /* Call the universal callback */ \ - hp_mode_common_endfn((entries), (cur_entry) TSRMLS_CC); \ - /* Free top entry and update entries linked list */ \ - (*(entries)) = (*(entries))->prev_hprof; \ - hp_fast_free_hprof_entry(cur_entry); \ - } \ - } while (0) - - -/** - * Returns formatted function name - * - * @param entry hp_entry - * @param result_buf ptr to result buf - * @param result_len max size of result buf - * @return total size of the function name returned in result_buf - * @author veeve - */ -size_t hp_get_entry_name(hp_entry_t *entry, - char *result_buf, - size_t result_len) { - - /* Validate result_len */ - if (result_len <= 1) { - /* Insufficient result_bug. Bail! */ - return 0; - } - - /* Add '@recurse_level' if required */ - /* NOTE: Dont use snprintf's return val as it is compiler dependent */ - if (entry->rlvl_hprof) { - snprintf(result_buf, result_len, - "%s@%d", - entry->name_hprof, entry->rlvl_hprof); - } - else { - snprintf(result_buf, result_len, - "%s", - entry->name_hprof); - } - - /* Force null-termination at MAX */ - result_buf[result_len - 1] = 0; - - return strlen(result_buf); -} - -/** - * Check if this entry should be ignored, first with a conservative Bloomish - * filter then with an exact check against the function names. - * - * @author mpal - */ -int hp_ignore_entry_work(uint8 hash_code, char *curr_func) { - int ignore = 0; - if (hp_ignored_functions_filter_collision(hash_code)) { - int i = 0; - for (; hp_globals.ignored_function_names[i] != NULL; i++) { - char *name = hp_globals.ignored_function_names[i]; - if ( !strcmp(curr_func, name)) { - ignore++; - break; - } - } - } - - return ignore; -} - -static inline int hp_ignore_entry(uint8 hash_code, char *curr_func) { - /* First check if ignoring functions is enabled */ - return hp_globals.ignored_function_names != NULL && - hp_ignore_entry_work(hash_code, curr_func); -} - -/** - * Extract relevant informations in the _generateBlock parameters - * - * @author ch - */ -static int qm_extract_param_generate_block(int i, zend_execute_data *execute_data TSRMLS_DC) { - zval *param_node; - const char *class_name; - zend_uint class_name_len; - zval *arr, *arr_final, **data, **data_final; - HashTable *arr_hash, *arr_hash_final; - HashPosition pointer, pointer_final; - char *key, *tmpstrbuf; - int key_len, typekey; - long index; - generate_renderize_block_details *current_gen_block_details; - - /* Do some sanity check, protect ourself against any modification of the magento core */ - /* For calling the debuger : __asm__("int3"); */ - if (!execute_data) { - PRINTF_QUANTA ("_generateBlock: execute_data NULL\n"); - return -1; - } - if (!execute_data->prev_execute_data) { - PRINTF_QUANTA ("_generateBlock: execute_data->prev_execute_data NULL\n"); - return -1; - } - if ((execute_data->prev_execute_data->function_state.arguments)[0] != (void*)2) { - PRINTF_QUANTA ("_generateBlock: execute_data->prev_execute_data->function_state.arguments is not 2 (%p)\n", \ - (execute_data->prev_execute_data->function_state.arguments)[0]); - return -1; - } - param_node = (zval *)(execute_data->prev_execute_data->function_state.arguments)[-2]; - if (!param_node) { - PRINTF_QUANTA ("_generateBlock: execute_data->prev_execute_data->function_state.arguments[-2] NULL\n"); - return -1; - } - - if (Z_TYPE_P(param_node) != IS_OBJECT) { - PRINTF_QUANTA ("_generateBlock: arguments[-2] is not an object\n"); - return -1; - } - - if (!Z_OBJ_HANDLER(*param_node, get_class_name)) { - PRINTF_QUANTA ("_generateBlock: arguments[-2] is an object of unknown class\n"); - return -1; - } - Z_OBJ_HANDLER(*param_node, get_class_name)(param_node, &class_name, &class_name_len, 0 TSRMLS_CC); - if ((class_name_len != 30) && memcmp(class_name, "Mage_Core_Model_Layout_Element", 30) ) - { - PRINTF_QUANTA ("_generateBlock: arguments[-1] is not a Mage_Core_Model_Layout_Element object (%s)\n", class_name); - efree((char*)class_name); - return -1; - } - efree((char*)class_name); - - /* Okay, we should have something that looks like what we want, now entering into the object - * at first we have a single entry (@attributes) which is an array, grab the pointer and enumerate the array in the array */ - arr_hash = Z_OBJPROP_P(param_node); - /* If we want to get a count : array_count = zend_hash_num_elements(arr_hash); */ - - for (zend_hash_internal_pointer_reset_ex(arr_hash, &pointer); - zend_hash_get_current_data_ex(arr_hash, (void**) &data, &pointer) == SUCCESS; - zend_hash_move_forward_ex(arr_hash, &pointer)) { - - if (zend_hash_get_current_key_ex(arr_hash, &key, &key_len, &index, 0, &pointer) == HASH_KEY_IS_STRING) { - if ((key_len != 11) && memcmp(key, "@attributes", 11)) { -#ifdef _QUANTA_MODULE_ULTRA_VERBOSE - /* Sometimes we seen label, action, block */ - PRINTF_QUANTA ("_generateBlock: Unknown outer key '%s', skipping....\n", key); -#endif - continue; - } - } else { - PRINTF_QUANTA ("_generateBlock: Hash key is not a string (%ld)\n", index); - continue; - } - - if (Z_TYPE_PP(data) != IS_ARRAY) { - PRINTF_QUANTA ("_generateBlock: Object doesn't contain an array, skipping... (type=%d)\n", Z_TYPE_PP(data)); - continue; - } - current_gen_block_details = ecalloc (1, sizeof(generate_renderize_block_details)); - - if (hp_globals.monitored_function_generate_renderize_block_first_linked_list == NULL) - hp_globals.monitored_function_generate_renderize_block_first_linked_list = current_gen_block_details; - else - hp_globals.monitored_function_generate_renderize_block_last_linked_list->next_generate_renderize_block_detail = current_gen_block_details; - - hp_globals.monitored_function_generate_renderize_block_last_linked_list = current_gen_block_details; - - current_gen_block_details->tsc_generate_start = hp_globals.monitored_function_tsc_start[i]; - - arr_hash_final = Z_ARRVAL_PP(data); - for (zend_hash_internal_pointer_reset_ex(arr_hash_final, &pointer_final); - zend_hash_get_current_data_ex(arr_hash_final, (void**) &data_final, &pointer_final) == SUCCESS; - zend_hash_move_forward_ex(arr_hash_final, &pointer_final)) { - - if (Z_TYPE_PP(data_final) != IS_STRING) { - PRINTF_QUANTA ("_generateBlock: Final array doesn't contain a string, skipping... (type=%d)\n", Z_TYPE_PP(data_final)); - continue; - } - if (zend_hash_get_current_key_ex(arr_hash_final, &key, &key_len, &index, 0, &pointer_final) != HASH_KEY_IS_STRING) { - PRINTF_QUANTA ("_generateBlock: Hash final key is numeric (%ld) => %s\n", index, Z_STRVAL_PP(data_final)); - continue; - } -#ifdef _QUANTA_MODULE_ULTRA_VERBOSE - PRINTF_QUANTA ("_generateBlock: final key '%s'=>'%s'\n", key, Z_STRVAL_PP(data_final)); //, Z_STRLEN_PP(data)); -#endif - - typekey = 0; - switch(key_len) { - case 5: - if (!memcmp(key, "type", 4)) - typekey = 1; - else if (!memcmp(key, "name", 4)) - typekey = 2; - break; - case 6: - if (!memcmp(key, "class", 5)) - typekey = 3; - break; - case 9: - if (!memcmp(key, "template", 8)) - typekey = 4; - break; - case 12: - if (!memcmp(key, "@attributes", 11)) - typekey = -1; - break; - default: - break; - } - - if (typekey == -1) - continue; - - if (typekey == 0) { -#ifdef _QUANTA_MODULE_ULTRA_VERBOSE - /* We also see keys : as, translate, before, after, output */ - PRINTF_QUANTA ("_generateBlock: Unknown final key='%s'=>'%s', skipping....\n", key, Z_STRVAL_PP(data_final)); -#endif - continue; - } - index = strlen (Z_STRVAL_PP(data_final)); - tmpstrbuf = emalloc (index + 1); - - memcpy (tmpstrbuf, Z_STRVAL_PP(data_final), index); - tmpstrbuf[index] = 0; - - switch (typekey) { - case 1: current_gen_block_details->type = tmpstrbuf; break; - case 2: current_gen_block_details->name = tmpstrbuf; break; - case 3: current_gen_block_details->class = tmpstrbuf; break; - case 4: current_gen_block_details->template = tmpstrbuf; break; - default: PRINTF_QUANTA ("_generateBlock: ** BAD ** Unknown typekey (%d)\n", typekey); break; - } - - } /* for - inner data */ - } /* for - outer data */ - return i; -} - -static int qm_extract_this_after_tohtml_do (char *name_in_layout) -{ - generate_renderize_block_details *current_render_block_details; - - if (hp_globals.renderize_block_last_used) { - /* Check if the last linked list is still the correct one */ - if (!strcmp(hp_globals.renderize_block_last_used->name, name_in_layout)) - { - /* Yes, we can use the shortcut */ -#ifdef _QUANTA_MODULE_ULTRA_VERBOSE - PRINTF_QUANTA ("_afterToHtml: Block name '%s' was just processed by _beforeToHtml. Using shortcut.\n", name_in_layout); -#endif - hp_globals.renderize_block_last_used->tsc_renderize_last_stop = cycle_timer(); - return 1; - } - } - /* No, we are in a recursive call, we have to fallback to linked-list lookup */ - current_render_block_details = hp_globals.monitored_function_generate_renderize_block_first_linked_list; - - while (current_render_block_details) { - if (!strcmp(current_render_block_details->name, name_in_layout)) - break; - current_render_block_details = current_render_block_details->next_generate_renderize_block_detail; - } - if (!current_render_block_details) { - /* Sometimes we get ANONYMOUS_xx blocks, ignore them */ - if (strlen(name_in_layout) > 10) { - if (!memcmp(name_in_layout, "ANONYMOUS_", 10)) - return 0; - } - PRINTF_QUANTA ("_afterToHtml: Block name '%s' just finished the renderize phase but was not seen in the _generateBlock phase.\n", name_in_layout); - return 0; - } -#ifdef _QUANTA_MODULE_ULTRA_VERBOSE - PRINTF_QUANTA ("_afterToHtml: Block name '%s' was NOT the last block processed by _beforeToHtml. Using slow path code.\n", name_in_layout); -#endif - current_render_block_details->tsc_renderize_last_stop = cycle_timer(); - return 1; -} - -static int qm_extract_this_before_tohtml_do (const char *class_name, zend_uint class_name_len, char *name_in_layout, char *template) -{ - int linked_list_pos = 1; - generate_renderize_block_details *current_render_block_details; - - /* Ok, we have something, search into our linked list for nameInLayout */ - current_render_block_details = hp_globals.monitored_function_generate_renderize_block_first_linked_list; - - linked_list_pos = 1; - while (current_render_block_details) { - if (!strcmp(current_render_block_details->name, name_in_layout)) - { - if (!current_render_block_details->class) { - current_render_block_details->class = emalloc(class_name_len + 1); - memcpy (current_render_block_details->class, class_name, class_name_len); - current_render_block_details->class[class_name_len] = 0; - } - /* Usually already filled by _generateBlock, but sometimes it's missing */ - if ((!current_render_block_details->template) && (template)) - current_render_block_details->template = template; - else - efree(template); - if (!current_render_block_details->tsc_renderize_first_start) - current_render_block_details->tsc_renderize_first_start = cycle_timer(); - - hp_globals.renderize_block_last_used = current_render_block_details; -#ifdef _QUANTA_MODULE_ULTRA_VERBOSE - PRINTF_QUANTA ("_beforeToHtml: Block name '%s' found in the _generateBlock list at position %d\n", name_in_layout, linked_list_pos); -#endif - return 1; - } - linked_list_pos++; - current_render_block_details = current_render_block_details->next_generate_renderize_block_detail; - } - /* Sometimes we get ANONYMOUS_xx blocks, ignore them */ - if (strlen(name_in_layout) > 10) { - if (!memcmp(name_in_layout, "ANONYMOUS_", 10)) - return 0; - } - PRINTF_QUANTA ("_beforeToHtml: Trying to renderize block %s not seen in _generateBlock. Ignoring.\n", name_in_layout); - if (template) - efree(template); - return 0; -} - -static int qm_extract_this_before_after_tohtml (int is_after_tohtml, zend_execute_data *execute_data TSRMLS_DC) -{ - zval *param_node, **data; - const char *class_name; - zend_uint class_name_len; - HashTable *arr_hash; - HashPosition pointer, pointer_final; - char *key, *tmpstrbuf, *name_in_layout, *template = NULL; - int key_len, typekey, i, ret; - long index; - - /* Do some sanity check, protect ourself against any modification of the magento core */ - /* For calling the debuger : __asm__("int3"); */ - if (!execute_data) { - PRINTF_QUANTA ("before/afterToHtml: execute_data NULL\n"); - return -1; - } - if (!execute_data->prev_execute_data) { - PRINTF_QUANTA ("before/afterToHtml: execute_data->prev_execute_data NULL\n"); - return -1; - } - param_node = execute_data->prev_execute_data->current_this; - if (Z_TYPE_P(param_node) != IS_OBJECT) { - PRINTF_QUANTA ("before/afterToHtml: 'this' is not an object\n"); - return -1; - } - - if (!Z_OBJ_HANDLER(*param_node, get_class_name)) { - PRINTF_QUANTA ("before/afterToHtml: 'this' is an object of unknown class\n"); - return -1; - } - Z_OBJ_HANDLER(*param_node, get_class_name)(param_node, &class_name, &class_name_len, 0 TSRMLS_CC); -#ifdef _QUANTA_MODULE_ULTRA_VERBOSE - PRINTF_QUANTA ("before/afterToHtml: 'this' class=%s\n", class_name); -#endif - - arr_hash = Z_OBJPROP_P(param_node); - /* If we want to get a count : array_count = zend_hash_num_elements(arr_hash); */ - - typekey = 0; - - for (zend_hash_internal_pointer_reset_ex(arr_hash, &pointer); - zend_hash_get_current_data_ex(arr_hash, (void**) &data, &pointer) == SUCCESS; - zend_hash_move_forward_ex(arr_hash, &pointer)) { - - int current_type_key = 0; - if (zend_hash_get_current_key_ex(arr_hash, &key, &key_len, &index, 0, &pointer) != HASH_KEY_IS_STRING) { - PRINTF_QUANTA ("before/afterToHtml: Hash key 'this' is not string (%ld)\n", index); - continue; - } - if ((key_len == 17) && !memcmp(key, "\0*\0_nameInLayout", 17)) { - typekey |= 0x1; - current_type_key = 1; - } - else if ((key_len == 13) && !memcmp(key, "\0*\0_template", 13)) { - if (Z_TYPE_PP(data) == IS_NULL) - continue; - typekey |= 0x2; - current_type_key = 2; - } - else { -#ifdef _QUANTA_MODULE_ULTRA_VERBOSE - /* Enable this code for dumping members name of the current class */ - if (key_len > 3) - PRINTF_QUANTA ("before/afterToHtml: Ignoring 'this' key+3 '%s' of len %d\n", key+3, key_len); - else - PRINTF_QUANTA ("before/afterToHtml: Ignoring 'this' key of len %d\n", key_len); -#endif - continue; - } - - if (Z_TYPE_PP(data) != IS_STRING) { - PRINTF_QUANTA ("before/afterToHtml: Key %s has a value which is not a string (%d)\n", key+3, Z_TYPE_PP(data)); -__asm__("int3"); - continue; - } -#ifdef _QUANTA_MODULE_ULTRA_VERBOSE - PRINTF_QUANTA ("before/afterToHtml: typekey=%d value=%s\n", typekey, Z_STRVAL_PP(data)); -#endif - index = strlen (Z_STRVAL_PP(data)); - tmpstrbuf = emalloc (index + 1); - memcpy (tmpstrbuf, Z_STRVAL_PP(data), index); - tmpstrbuf[index] = 0; - if (current_type_key == 1) { - name_in_layout = tmpstrbuf; - if (is_after_tohtml) - break; /* We don't need anything more (like template) here */ - } - else - template = tmpstrbuf; - - } - if (typekey == 0x0) { - PRINTF_QUANTA ("before/afterToHtml: 'this' doesn't have a member 'nameInLayout'\n"); - efree((char*)class_name); - return i; - } - else if (typekey == 0x2) { - PRINTF_QUANTA ("before/afterToHtml: 'this' doesnt have a member 'nameInLayout' but do have 'template'\n"); - efree(template); - efree((char*)class_name); - return i; - } - if (is_after_tohtml) - ret = qm_extract_this_after_tohtml_do(name_in_layout); - else - ret = qm_extract_this_before_tohtml_do(class_name, class_name_len, name_in_layout, template); - - efree(name_in_layout); - efree((char*)class_name); - return i; -} - -/** - * Extract relevant informations in the _generateBlock parameters - * - * @author ch - */ -static int qm_extract_this_before_tohtml(zend_execute_data *execute_data TSRMLS_DC) -{ - return qm_extract_this_before_after_tohtml(0, execute_data); -} - -static int qm_after_tohmtl(zend_execute_data *execute_data TSRMLS_DC) -{ - return qm_extract_this_before_after_tohtml(1, execute_data); -} - -/** - * Check if this entry should be ignored, first with a conservative Bloomish - * filter then with an exact check against the function names. - * - * @author ch - * return -1 if we don't monitor specifically this function, -2 if we don't monitor at all - */ -int qm_record_timers_loading_time(uint8 hash_code, char *curr_func, zend_execute_data *execute_data TSRMLS_DC) { - int i; - - /* Search quickly if we may have a match */ - if (!hp_monitored_functions_filter_collision(hash_code)) - return -1; - - if (hp_globals.profiler_level == QUANTA_MON_MODE_EVENTS_ONLY) - i = POS_ENTRY_EVENTS_ONLY; - else - i = 0; - - /* We MAY have a match, enumerate the function array for an exact match */ - for (; hp_globals.monitored_function_names[i] != NULL; i++) { - char *name = hp_globals.monitored_function_names[i]; - if ( !strcmp(curr_func, name)) - break; - } - - if ( hp_globals.monitored_function_names[i] == NULL) - return -1; /* False match, we have nothing */ - - hp_globals.monitored_function_tsc_start[i] = cycle_timer(); - - if ( i == POS_ENTRY_BEFORETOHTML ) - return qm_extract_this_before_tohtml(execute_data); - - /* Something special for this function ? */ - if ( i == POS_ENTRY_GENERATEBLOCK ) - return qm_extract_param_generate_block(i, execute_data); - return i; /* No, bailout */ -} - -/** - * Build a caller qualified name for a callee. - * - * For example, if A() is caller for B(), then it returns "A==>B". - * Recursive invokations are denoted with @ where n is the recursion - * depth. - * - * For example, "foo==>foo@1", and "foo@2==>foo@3" are examples of direct - * recursion. And "bar==>foo@1" is an example of an indirect recursive - * call to foo (implying the foo() is on the call stack some levels - * above). - * - * @author kannan, veeve - */ -size_t hp_get_function_stack(hp_entry_t *entry, - int level, - char *result_buf, - size_t result_len) { - size_t len = 0; - - /* End recursion if we dont need deeper levels or we dont have any deeper - * levels */ - if (!entry->prev_hprof || (level <= 1)) { - return hp_get_entry_name(entry, result_buf, result_len); - } - - /* Take care of all ancestors first */ - len = hp_get_function_stack(entry->prev_hprof, - level - 1, - result_buf, - result_len); - - /* Append the delimiter */ -# define HP_STACK_DELIM "==>" -# define HP_STACK_DELIM_LEN (sizeof(HP_STACK_DELIM) - 1) - - if (result_len < (len + HP_STACK_DELIM_LEN)) { - /* Insufficient result_buf. Bail out! */ - return len; - } - - /* Add delimiter only if entry had ancestors */ - if (len) { - strncat(result_buf + len, - HP_STACK_DELIM, - result_len - len); - len += HP_STACK_DELIM_LEN; - } - -# undef HP_STACK_DELIM_LEN -# undef HP_STACK_DELIM - - /* Append the current function name */ - return len + hp_get_entry_name(entry, - result_buf + len, - result_len - len); -} - -/** - * Takes an input of the form /a/b/c/d/foo.php and returns - * a pointer to one-level directory and basefile name - * (d/foo.php) in the same string. - */ -static const char *hp_get_base_filename(const char *filename) { - const char *ptr; - int found = 0; - - if (!filename) - return ""; - - /* ch: we want the complete path, so return directly */ - /* reverse search for "/" and return a ptr to the next char */ - /* - for (ptr = filename + strlen(filename) - 1; ptr >= filename; ptr--) { - if (*ptr == '/') { - found++; - } - if (found == 2) { - return ptr + 1; - } - } - */ - /* no "/" char found, so return the whole string */ - return filename; -} - -/** - * Get the name of the current function. The name is qualified with - * the class name if the function is in a class. - * - * @author kannan, hzhao - */ -static char *hp_get_function_name(zend_op_array *ops, char **pathname TSRMLS_DC) { - zend_execute_data *data; - const char *func = NULL; - const char *cls = NULL; - char *ret = NULL; - int len; - zend_function *curr_func; - - *pathname = "BUG"; - data = EG(current_execute_data); - - if (data) { - /* shared meta data for function on the call stack */ - curr_func = data->function_state.function; - - /* extract function name from the meta info */ - func = curr_func->common.function_name; - - if (func) { - /* previously, the order of the tests in the "if" below was - * flipped, leading to incorrect function names in profiler - * reports. When a method in a super-type is invoked the - * profiler should qualify the function name with the super-type - * class name (not the class name based on the run-time type - * of the object. - */ - if (curr_func->common.scope) { - cls = curr_func->common.scope->name; - } else if (data->object) { - cls = Z_OBJCE(*data->object)->name; - } - - if (cls) { - const char *filename; - int len; - if (ops) - filename = hp_get_base_filename(ops->filename); - else - filename = "null"; - *pathname = strdup(filename); - len = strlen(cls) + strlen(func) + 8; - ret = (char*)emalloc(len); - snprintf(ret, len, "%s::%s", cls, func); - } else { - ret = estrdup(func); - } - } else { - long curr_op; - int add_filename = 1; - - /* we are dealing with a special directive/function like - * include, eval, etc. - */ -#if ZEND_EXTENSION_API_NO >= 220121212 - if (data->prev_execute_data) { - curr_op = data->prev_execute_data->opline->extended_value; - } else { - curr_op = data->opline->extended_value; - } -#elif ZEND_EXTENSION_API_NO >= 220100525 - curr_op = data->opline->extended_value; -#else - curr_op = data->opline->op2.u.constant.value.lval; -#endif - - switch (curr_op) { - case ZEND_EVAL: - func = "eval"; - break; - case ZEND_INCLUDE: - func = "include"; - add_filename = 1; - break; - case ZEND_REQUIRE: - func = "require"; - add_filename = 1; - break; - case ZEND_INCLUDE_ONCE: - func = "include_once"; - add_filename = 1; - break; - case ZEND_REQUIRE_ONCE: - func = "require_once"; - add_filename = 1; - break; - default: - func = "???_op"; - break; - } - - /* For some operations, we'll add the filename as part of the function - * name to make the reports more useful. So rather than just "include" - * you'll see something like "run_init::foo.php" in your reports. - */ - if (add_filename){ - const char *filename; - int len; - filename = hp_get_base_filename((curr_func->op_array).filename); - len = strlen("run_init") + strlen(filename) + 3; - ret = (char *)emalloc(len); - snprintf(ret, len, "run_init::%s", filename); - *pathname = strdup(filename); - } else { - ret = estrdup(func); - } - } - } - return ret; -} - -/** - * Free any items in the free list. - */ -static void hp_free_the_free_list() { - hp_entry_t *p = hp_globals.entry_free_list; - hp_entry_t *cur; - - while (p) { - cur = p; - p = p->prev_hprof; - free(cur); - } -} - -/** - * Fast allocate a hp_entry_t structure. Picks one from the - * free list if available, else does an actual allocate. - * - * Doesn't bother initializing allocated memory. - * - * @author kannan - */ -static hp_entry_t *hp_fast_alloc_hprof_entry() { - hp_entry_t *p; - - p = hp_globals.entry_free_list; - - if (p) { - hp_globals.entry_free_list = p->prev_hprof; - return p; - } else { - return (hp_entry_t *)malloc(sizeof(hp_entry_t)); - } -} - -/** - * Fast free a hp_entry_t structure. Simply returns back - * the hp_entry_t to a free list and doesn't actually - * perform the free. - * - * @author kannan - */ -static void hp_fast_free_hprof_entry(hp_entry_t *p) { - - /* we use/overload the prev_hprof field in the structure to link entries in - * the free list. */ - p->prev_hprof = hp_globals.entry_free_list; - hp_globals.entry_free_list = p; -} - -/** - * Increment the count of the given stat with the given count - * If the stat was not set before, inits the stat to the given count - * - * @param zval *counts Zend hash table pointer - * @param char *name Name of the stat - * @param long count Value of the stat to incr by - * @return void - * @author kannan - */ -void hp_inc_count(zval *counts, char *name, long count TSRMLS_DC) { - HashTable *ht; - void *data; - - if (!counts) return; - ht = HASH_OF(counts); - if (!ht) return; - - if (zend_hash_find(ht, name, strlen(name) + 1, &data) == SUCCESS) { - ZVAL_LONG(*(zval**)data, Z_LVAL_PP((zval**)data) + count); - } else { - add_assoc_long(counts, name, count); - } -} - -/** - * Looksup the hash table for the given symbol - * Initializes a new array() if symbol is not present - * - * @author kannan, veeve - */ -zval * hp_hash_lookup(char *symbol TSRMLS_DC) { - HashTable *ht; - void *data; - zval *counts = (zval *) 0; - - /* Bail if something is goofy */ - if (!hp_globals.stats_count || !(ht = HASH_OF(hp_globals.stats_count))) { - return (zval *) 0; - } - - /* Lookup our hash table */ - if (zend_hash_find(ht, symbol, strlen(symbol) + 1, &data) == SUCCESS) { - /* Symbol already exists */ - counts = *(zval **) data; - } - else { - /* Add symbol to hash table */ - MAKE_STD_ZVAL(counts); - array_init(counts); - add_assoc_zval(hp_globals.stats_count, symbol, counts); - } - - return counts; -} - -/** - * Truncates the given timeval to the nearest slot begin, where - * the slot size is determined by intr - * - * @param tv Input timeval to be truncated in place - * @param intr Time interval in microsecs - slot width - * @return void - * @author veeve - */ -void hp_trunc_time(struct timeval *tv, - uint64 intr) { - uint64 time_in_micro; - - /* Convert to microsecs and trunc that first */ - time_in_micro = (tv->tv_sec * 1000000) + tv->tv_usec; - time_in_micro /= intr; - time_in_micro *= intr; - - /* Update tv */ - tv->tv_sec = (time_in_micro / 1000000); - tv->tv_usec = (time_in_micro % 1000000); -} - -/** - * Sample the stack. Add it to the stats_count global. - * - * @param tv current time - * @param entries func stack as linked list of hp_entry_t - * @return void - * @author veeve - */ -void hp_sample_stack(hp_entry_t **entries TSRMLS_DC) { - char key[SCRATCH_BUF_LEN]; - char symbol[SCRATCH_BUF_LEN * 1000]; - - /* Build key */ - snprintf(key, sizeof(key), - "%d.%06d", - hp_globals.last_sample_time.tv_sec, - hp_globals.last_sample_time.tv_usec); - - /* Init stats in the global stats_count hashtable */ - hp_get_function_stack(*entries, - INT_MAX, - symbol, - sizeof(symbol)); - - add_assoc_string(hp_globals.stats_count, - key, - symbol, - 1); - return; -} - -/** - * Checks to see if it is time to sample the stack. - * Calls hp_sample_stack() if its time. - * - * @param entries func stack as linked list of hp_entry_t - * @param last_sample time the last sample was taken - * @param sampling_intr sampling interval in microsecs - * @return void - * @author veeve - */ -void hp_sample_check(hp_entry_t **entries TSRMLS_DC) { - /* Validate input */ - if (!entries || !(*entries)) { - return; - } - - /* See if its time to sample. While loop is to handle a single function - * taking a long time and passing several sampling intervals. */ - while ((cycle_timer() - hp_globals.last_sample_tsc) - > hp_globals.sampling_interval_tsc) { - - /* bump last_sample_tsc */ - hp_globals.last_sample_tsc += hp_globals.sampling_interval_tsc; - - /* bump last_sample_time - HAS TO BE UPDATED BEFORE calling hp_sample_stack */ - incr_us_interval(&hp_globals.last_sample_time, QUANTA_MON_SAMPLING_INTERVAL); - - /* sample the stack */ - hp_sample_stack(entries TSRMLS_CC); - } - - return; -} - - -/** - * *********************** - * High precision timer related functions. - * *********************** - */ - -/** - * Get time stamp counter (TSC) value via 'rdtsc' instruction. - * - * @return 64 bit unsigned integer - * @author cjiang - */ -static inline uint64 cycle_timer() { - uint32 __a,__d; - uint64 val; - asm volatile("rdtsc" : "=a" (__a), "=d" (__d)); - (val) = ((uint64)__a) | (((uint64)__d)<<32); - return val; -} - -/** - * Bind the current process to a specified CPU. This function is to ensure that - * the OS won't schedule the process to different processors, which would make - * values read by rdtsc unreliable. - * - * @param uint32 cpu_id, the id of the logical cpu to be bound to. - * @return int, 0 on success, and -1 on failure. - * - * @author cjiang - */ -int bind_to_cpu(uint32 cpu_id) { - cpu_set_t new_mask; - - CPU_ZERO(&new_mask); - CPU_SET(cpu_id, &new_mask); - - if (SET_AFFINITY(0, sizeof(cpu_set_t), &new_mask) < 0) { - perror("setaffinity"); - return -1; - } - - /* record the cpu_id the process is bound to. */ - hp_globals.cur_cpu_id = cpu_id; - - return 0; -} - -/** - * Get time delta in microseconds. - */ -static long get_us_interval(struct timeval *start, struct timeval *end) { - return (((end->tv_sec - start->tv_sec) * 1000000) - + (end->tv_usec - start->tv_usec)); -} - -/** - * Incr time with the given microseconds. - */ -static void incr_us_interval(struct timeval *start, uint64 incr) { - incr += (start->tv_sec * 1000000 + start->tv_usec); - start->tv_sec = incr/1000000; - start->tv_usec = incr%1000000; - return; -} - -/** - * Convert from TSC counter values to equivalent microseconds. - * - * @param uint64 count, TSC count value - * @param double cpu_frequency, the CPU clock rate (MHz) - * @return 64 bit unsigned integer - * - * @author cjiang - */ -static inline double get_us_from_tsc(uint64 count, double cpu_frequency) { - return count / cpu_frequency; -} - -/** - * Convert microseconds to equivalent TSC counter ticks - * - * @param uint64 microseconds - * @param double cpu_frequency, the CPU clock rate (MHz) - * @return 64 bit unsigned integer - * - * @author veeve - */ -static inline uint64 get_tsc_from_us(uint64 usecs, double cpu_frequency) { - return (uint64) (usecs * cpu_frequency); -} - -/** - * This is a microbenchmark to get cpu frequency the process is running on. The - * returned value is used to convert TSC counter values to microseconds. - * - * @return double. - * @author cjiang - */ -static double get_cpu_frequency() { - struct timeval start; - struct timeval end; - - if (gettimeofday(&start, 0)) { - perror("gettimeofday"); - return 0.0; - } - uint64 tsc_start = cycle_timer(); - /* Sleep for 5 miliseconds. Comparaing with gettimeofday's few microseconds - * execution time, this should be enough. */ - usleep(5000); - if (gettimeofday(&end, 0)) { - perror("gettimeofday"); - return 0.0; - } - uint64 tsc_end = cycle_timer(); - return (tsc_end - tsc_start) * 1.0 / (get_us_interval(&start, &end)); -} - -/** - * Calculate frequencies for all available cpus. - * - * @author cjiang - */ -static void get_all_cpu_frequencies() { - int id; - double frequency; - - hp_globals.cpu_frequencies = malloc(sizeof(double) * hp_globals.cpu_num); - if (hp_globals.cpu_frequencies == NULL) { - return; - } - - /* Iterate over all cpus found on the machine. */ - for (id = 0; id < hp_globals.cpu_num; ++id) { - /* Only get the previous cpu affinity mask for the first call. */ - if (bind_to_cpu(id)) { - clear_frequencies(); - return; - } - - /* Make sure the current process gets scheduled to the target cpu. This - * might not be necessary though. */ - usleep(0); - - frequency = get_cpu_frequency(); - if (frequency == 0.0) { - clear_frequencies(); - return; - } - hp_globals.cpu_frequencies[id] = frequency; - } -} - -/** - * Restore cpu affinity mask to a specified value. It returns 0 on success and - * -1 on failure. - * - * @param cpu_set_t * prev_mask, previous cpu affinity mask to be restored to. - * @return int, 0 on success, and -1 on failure. - * - * @author cjiang - */ -int restore_cpu_affinity(cpu_set_t * prev_mask) { - if (SET_AFFINITY(0, sizeof(cpu_set_t), prev_mask) < 0) { - perror("restore setaffinity"); - return -1; - } - /* default value ofor cur_cpu_id is 0. */ - hp_globals.cur_cpu_id = 0; - return 0; -} - -/** - * Reclaim the memory allocated for cpu_frequencies. - * - * @author cjiang - */ -static void clear_frequencies() { - if (hp_globals.cpu_frequencies) { - free(hp_globals.cpu_frequencies); - hp_globals.cpu_frequencies = NULL; - } - restore_cpu_affinity(&hp_globals.prev_mask); -} - - -/** - * *************************** - * QUANTA_MON DUMMY CALLBACKS - * *************************** - */ -void hp_mode_dummy_init_cb(TSRMLS_D) { } - - -void hp_mode_dummy_exit_cb(TSRMLS_D) { } - - -void hp_mode_dummy_beginfn_cb(hp_entry_t **entries, - hp_entry_t *current TSRMLS_DC) { } - -void hp_mode_dummy_endfn_cb(hp_entry_t **entries TSRMLS_DC) { } - - -/** - * **************************** - * QUANTA_MON COMMON CALLBACKS - * **************************** - */ -/** - * QUANTA_MON universal begin function. - * This function is called for all modes before the - * mode's specific begin_function callback is called. - * - * @param hp_entry_t **entries linked list (stack) - * of hprof entries - * @param hp_entry_t *current hprof entry for the current fn - * @return void - * @author kannan, veeve - */ -void hp_mode_common_beginfn(hp_entry_t **entries, - hp_entry_t *current TSRMLS_DC) { - hp_entry_t *p; - - /* This symbol's recursive level */ - int recurse_level = 0; - - if (hp_globals.func_hash_counters[current->hash_code] > 0) { - /* Find this symbols recurse level */ - for(p = (*entries); p; p = p->prev_hprof) { - if (!strcmp(current->name_hprof, p->name_hprof)) { - recurse_level = (p->rlvl_hprof) + 1; - break; - } - } - } - hp_globals.func_hash_counters[current->hash_code]++; - - /* Init current function's recurse level */ - current->rlvl_hprof = recurse_level; -} - -/** - * QUANTA_MON universal end function. This function is called for all modes after - * the mode's specific end_function callback is called. - * - * @param hp_entry_t **entries linked list (stack) of hprof entries - * @return void - * @author kannan, veeve - */ -void hp_mode_common_endfn(hp_entry_t **entries, hp_entry_t *current TSRMLS_DC) { - hp_globals.func_hash_counters[current->hash_code]--; -} - - -/** - * ********************************* - * QUANTA_MON INIT MODULE CALLBACKS - * ********************************* - */ -/** - * QUANTA_MON_MODE_SAMPLED's init callback - * - * @author veeve - */ -void hp_mode_sampled_init_cb(TSRMLS_D) { - struct timeval now; - uint64 truncated_us; - uint64 truncated_tsc; - double cpu_freq = hp_globals.cpu_frequencies[hp_globals.cur_cpu_id]; - - /* Init the last_sample in tsc */ - hp_globals.last_sample_tsc = cycle_timer(); - - /* Find the microseconds that need to be truncated */ - gettimeofday(&hp_globals.last_sample_time, 0); - now = hp_globals.last_sample_time; - hp_trunc_time(&hp_globals.last_sample_time, QUANTA_MON_SAMPLING_INTERVAL); - - /* Subtract truncated time from last_sample_tsc */ - truncated_us = get_us_interval(&hp_globals.last_sample_time, &now); - truncated_tsc = get_tsc_from_us(truncated_us, cpu_freq); - if (hp_globals.last_sample_tsc > truncated_tsc) { - /* just to be safe while subtracting unsigned ints */ - hp_globals.last_sample_tsc -= truncated_tsc; - } - - /* Convert sampling interval to ticks */ - hp_globals.sampling_interval_tsc = - get_tsc_from_us(QUANTA_MON_SAMPLING_INTERVAL, cpu_freq); -} - - -/** - * ************************************ - * QUANTA_MON BEGIN FUNCTION CALLBACKS - * ************************************ - */ - -/** - * QUANTA_MON_MODE_HIERARCHICAL's begin function callback - * - * @author kannan - */ -void hp_mode_hier_beginfn_cb(hp_entry_t **entries, - hp_entry_t *current TSRMLS_DC) { - /* Get start tsc counter */ - current->tsc_start = cycle_timer(); - - /* Get CPU usage */ - if (hp_globals.quanta_mon_flags & QUANTA_MON_FLAGS_CPU) { - getrusage(RUSAGE_SELF, &(current->ru_start_hprof)); - } - - /* Get memory usage */ - if (hp_globals.quanta_mon_flags & QUANTA_MON_FLAGS_MEMORY) { - current->mu_start_hprof = zend_memory_usage(0 TSRMLS_CC); - current->pmu_start_hprof = zend_memory_peak_usage(0 TSRMLS_CC); - } -} - -/** - * QUANTA_MON_MODE_MAGENTO_PROFILING's begin function callback - * - * @author ch - */ -void hp_mode_magento_profil_beginfn_cb(hp_entry_t **entries, - hp_entry_t *current TSRMLS_DC) { -} -/** - * QUANTA_MON_MODE_EVENTS_ONLY's begin function callback - * - * @author ch - */ -void hp_mode_events_only_beginfn_cb(hp_entry_t **entries, - hp_entry_t *current TSRMLS_DC) { -} - -/** - * QUANTA_MON_MODE_SAMPLED's begin function callback - * - * @author veeve - */ -void hp_mode_sampled_beginfn_cb(hp_entry_t **entries, - hp_entry_t *current TSRMLS_DC) { - /* See if its time to take a sample */ - hp_sample_check(entries TSRMLS_CC); -} - - -/** - * ********************************** - * QUANTA_MON END FUNCTION CALLBACKS - * ********************************** - */ - -/** - * QUANTA_MON shared end function callback - * - * @author kannan - */ -zval * hp_mode_shared_endfn_cb(hp_entry_t *top, - char *symbol TSRMLS_DC) { - zval *counts; - uint64 tsc_end; - - /* Get end tsc counter */ - tsc_end = cycle_timer(); - - /* Get the stat array */ - if (!(counts = hp_hash_lookup(symbol TSRMLS_CC))) { - return (zval *) 0; - } - - /* Bump stats in the counts hashtable */ - hp_inc_count(counts, "ct", 1 TSRMLS_CC); - - hp_inc_count(counts, "wt", get_us_from_tsc(tsc_end - top->tsc_start, - hp_globals.cpu_frequencies[hp_globals.cur_cpu_id]) TSRMLS_CC); - return counts; -} - -/** - * QUANTA_MON_MODE_HIERARCHICAL's end function callback - * - * @author kannan - */ -void hp_mode_hier_endfn_cb(hp_entry_t **entries TSRMLS_DC) { - hp_entry_t *top = (*entries); - zval *counts; - struct rusage ru_end; - char symbol[SCRATCH_BUF_LEN]; - long int mu_end; - long int pmu_end; - - /* Get the stat array */ - hp_get_function_stack(top, 2, symbol, sizeof(symbol)); - if (!(counts = hp_mode_shared_endfn_cb(top, - symbol TSRMLS_CC))) { - return; - } - - if (hp_globals.quanta_mon_flags & QUANTA_MON_FLAGS_CPU) { - /* Get CPU usage */ - getrusage(RUSAGE_SELF, &ru_end); - - /* Bump CPU stats in the counts hashtable */ - hp_inc_count(counts, "cpu", (get_us_interval(&(top->ru_start_hprof.ru_utime), - &(ru_end.ru_utime)) + - get_us_interval(&(top->ru_start_hprof.ru_stime), - &(ru_end.ru_stime))) - TSRMLS_CC); - } - - if (hp_globals.quanta_mon_flags & QUANTA_MON_FLAGS_MEMORY) { - /* Get Memory usage */ - mu_end = zend_memory_usage(0 TSRMLS_CC); - pmu_end = zend_memory_peak_usage(0 TSRMLS_CC); - - /* Bump Memory stats in the counts hashtable */ - hp_inc_count(counts, "mu", mu_end - top->mu_start_hprof TSRMLS_CC); - hp_inc_count(counts, "pmu", pmu_end - top->pmu_start_hprof TSRMLS_CC); - } -} - -/** - * QUANTA_MON_MODE_SAMPLED's end function callback - * - * @author veeve - */ -void hp_mode_sampled_endfn_cb(hp_entry_t **entries TSRMLS_DC) { - /* See if its time to take a sample */ - hp_sample_check(entries TSRMLS_CC); -} - -/** - * QUANTA_MON_MODE_MAGENTO_PROFILING's end function callback - * - * @author ch - */ -void hp_mode_magento_profil_endfn_cb(hp_entry_t **entries TSRMLS_DC) { -} - - -/** - * QUANTA_MON_MODE_EVENTS_ONLY's end function callback - * - * @author ch - */ -void hp_mode_events_only_endfn_cb(hp_entry_t **entries TSRMLS_DC) { -} - - -/** - * *************************** - * PHP EXECUTE/COMPILE PROXIES - * *************************** - */ - -/** - * QuantaMon enable replaced the zend_execute function with this - * new execute function. We can do whatever profiling we need to - * before and after calling the actual zend_execute(). - * - * @author hzhao, kannan - */ -#if PHP_VERSION_ID < 50500 -ZEND_DLEXPORT void hp_execute (zend_op_array *ops TSRMLS_DC) { -#else -ZEND_DLEXPORT void hp_execute_ex (zend_execute_data *execute_data TSRMLS_DC) { - zend_op_array *ops = execute_data->op_array; -#endif - char *func = NULL; - char *pathname; - int hp_profile_flag = 1; - - func = hp_get_function_name(ops, &pathname TSRMLS_CC); - if (!func) { -#if PHP_VERSION_ID < 50500 - _zend_execute(ops TSRMLS_CC); -#else - _zend_execute_ex(execute_data TSRMLS_CC); -#endif - return; - } - - BEGIN_PROFILING(&hp_globals.entries, func, hp_profile_flag, pathname, execute_data); -#if PHP_VERSION_ID < 50500 - _zend_execute(ops TSRMLS_CC); -#else - _zend_execute_ex(execute_data TSRMLS_CC); -#endif - if (hp_globals.entries) { - END_PROFILING(&hp_globals.entries, hp_profile_flag, execute_data); - } - efree(func); -} - -#undef EX -#define EX(element) ((execute_data)->element) - -/** - * Very similar to hp_execute. Proxy for zend_execute_internal(). - * Applies to zend builtin functions. - * - * @author hzhao, kannan - */ - -#if PHP_VERSION_ID < 50500 -#define EX_T(offset) (*(temp_variable *)((char *) EX(Ts) + offset)) - -ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data, - int ret TSRMLS_DC) { -#else -#define EX_T(offset) (*EX_TMP_VAR(execute_data, offset)) - -ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data, - struct _zend_fcall_info *fci, int ret TSRMLS_DC) { -#endif - zend_execute_data *current_data; - char *func = NULL; - char *pathname; - int hp_profile_flag = 1; - - current_data = EG(current_execute_data); - func = hp_get_function_name(current_data->op_array, &pathname TSRMLS_CC); - if (func) { - BEGIN_PROFILING(&hp_globals.entries, func, hp_profile_flag, pathname, execute_data); - } - - if (!_zend_execute_internal) { - /* no old override to begin with. so invoke the builtin's implementation */ - -#if ZEND_EXTENSION_API_NO >= 220121212 - /* PHP 5.5. This is just inlining a copy of execute_internal(). */ - - if (fci != NULL) { - ((zend_internal_function *) execute_data->function_state.function)->handler( - fci->param_count, - *fci->retval_ptr_ptr, - fci->retval_ptr_ptr, - fci->object_ptr, - 1 TSRMLS_CC); - } else { - zval **return_value_ptr = &EX_TMP_VAR(execute_data, execute_data->opline->result.var)->var.ptr; - ((zend_internal_function *) execute_data->function_state.function)->handler( - execute_data->opline->extended_value, - *return_value_ptr, - (execute_data->function_state.function->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) - ? return_value_ptr - : NULL, - execute_data->object, - ret TSRMLS_CC); - } -#elif ZEND_EXTENSION_API_NO >= 220100525 - zend_op *opline = EX(opline); - temp_variable *retvar = &EX_T(opline->result.var); - ((zend_internal_function *) EX(function_state).function)->handler( - opline->extended_value, - retvar->var.ptr, - (EX(function_state).function->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) ? - &retvar->var.ptr:NULL, - EX(object), ret TSRMLS_CC); -#else - zend_op *opline = EX(opline); - ((zend_internal_function *) EX(function_state).function)->handler( - opline->extended_value, - EX_T(opline->result.u.var).var.ptr, - EX(function_state).function->common.return_reference ? - &EX_T(opline->result.u.var).var.ptr:NULL, - EX(object), ret TSRMLS_CC); -#endif - } else { - /* call the old override */ -#if PHP_VERSION_ID < 50500 - _zend_execute_internal(execute_data, ret TSRMLS_CC); -#else - _zend_execute_internal(execute_data, fci, ret TSRMLS_CC); -#endif - } - - if (func) { - if (hp_globals.entries) { - END_PROFILING(&hp_globals.entries, hp_profile_flag, execute_data); - } - efree(func); - } - -} - -/** - * Proxy for zend_compile_file(). Used to profile PHP compilation time. - * - * @author kannan, hzhao - */ -ZEND_DLEXPORT zend_op_array* hp_compile_file(zend_file_handle *file_handle, - int type TSRMLS_DC) { - - char *filename; - char *func; - int len; - zend_op_array *ret; - int hp_profile_flag = 1; - - filename = strdup(hp_get_base_filename(file_handle->filename)); - len = strlen("load") + strlen(filename) + 3; - func = (char *)emalloc(len); - snprintf(func, len, "load::%s", filename); - - BEGIN_PROFILING(&hp_globals.entries, func, hp_profile_flag, filename, NULL); - ret = _zend_compile_file(file_handle, type TSRMLS_CC); - if (hp_globals.entries) { - END_PROFILING(&hp_globals.entries, hp_profile_flag, NULL); - } - - efree(func); - return ret; -} - -/** - * Proxy for zend_compile_string(). Used to profile PHP eval compilation time. - */ -ZEND_DLEXPORT zend_op_array* hp_compile_string(zval *source_string, char *filename TSRMLS_DC) { - - char *func; - int len; - zend_op_array *ret; - int hp_profile_flag = 1; - - len = strlen("eval") + strlen(filename) + 3; - func = (char *)emalloc(len); - snprintf(func, len, "eval::%s", filename); - - BEGIN_PROFILING(&hp_globals.entries, func, hp_profile_flag, filename, NULL); - ret = _zend_compile_string(source_string, filename TSRMLS_CC); - if (hp_globals.entries) { - END_PROFILING(&hp_globals.entries, hp_profile_flag, NULL); - } - - efree(func); - return ret; -} - -/** - * ************************** - * MAIN QUANTA_MON CALLBACKS - * ************************** - */ - -/** - * This function gets called once when quanta_mon gets enabled. - * It replaces all the functions like zend_execute, zend_execute_internal, - * etc that needs to be instrumented with their corresponding proxies. - */ -static void hp_begin(long level, long quanta_mon_flags TSRMLS_DC) { - if (!hp_globals.enabled) { - int hp_profile_flag = 1; - - hp_globals.enabled = 1; - hp_globals.quanta_mon_flags = (uint32)quanta_mon_flags; - - /* Replace zend_compile with our proxy */ - _zend_compile_file = zend_compile_file; - zend_compile_file = hp_compile_file; - - /* Replace zend_compile_string with our proxy */ - _zend_compile_string = zend_compile_string; - zend_compile_string = hp_compile_string; - - /* Replace zend_execute with our proxy */ -#if PHP_VERSION_ID < 50500 - _zend_execute = zend_execute; - zend_execute = hp_execute; -#else - _zend_execute_ex = zend_execute_ex; - zend_execute_ex = hp_execute_ex; -#endif - - /* Replace zend_execute_internal with our proxy */ - _zend_execute_internal = zend_execute_internal; - if (!(hp_globals.quanta_mon_flags & QUANTA_MON_FLAGS_NO_BUILTINS)) { - /* if NO_BUILTINS is not set (i.e. user wants to profile builtins), - * then we intercept internal (builtin) function calls. - */ - zend_execute_internal = hp_execute_internal; - } - - /* Initialize with the dummy mode first Having these dummy callbacks saves - * us from checking if any of the callbacks are NULL everywhere. */ - hp_globals.mode_cb.init_cb = hp_mode_dummy_init_cb; - hp_globals.mode_cb.exit_cb = hp_mode_dummy_exit_cb; - hp_globals.mode_cb.begin_fn_cb = hp_mode_dummy_beginfn_cb; - hp_globals.mode_cb.end_fn_cb = hp_mode_dummy_endfn_cb; - - /* Register the appropriate callback functions Override just a subset of - * all the callbacks is OK. */ - switch(level) { - case QUANTA_MON_MODE_HIERARCHICAL: - hp_globals.mode_cb.begin_fn_cb = hp_mode_hier_beginfn_cb; - hp_globals.mode_cb.end_fn_cb = hp_mode_hier_endfn_cb; - break; - case QUANTA_MON_MODE_SAMPLED: - hp_globals.mode_cb.init_cb = hp_mode_sampled_init_cb; - hp_globals.mode_cb.begin_fn_cb = hp_mode_sampled_beginfn_cb; - hp_globals.mode_cb.end_fn_cb = hp_mode_sampled_endfn_cb; - break; - case QUANTA_MON_MODE_MAGENTO_PROFILING: - hp_globals.mode_cb.begin_fn_cb = hp_mode_magento_profil_beginfn_cb; - hp_globals.mode_cb.end_fn_cb = hp_mode_magento_profil_endfn_cb; - case QUANTA_MON_MODE_EVENTS_ONLY: - hp_globals.mode_cb.begin_fn_cb = hp_mode_events_only_beginfn_cb; - hp_globals.mode_cb.end_fn_cb = hp_mode_events_only_endfn_cb; - break; - } - - /* one time initializations */ - hp_init_profiler_state(level TSRMLS_CC); - - /* start profiling from fictitious main() */ - BEGIN_PROFILING(&hp_globals.entries, ROOT_SYMBOL, hp_profile_flag, "main", NULL); - } -} - -/** - * Called at request shutdown time. Cleans the profiler's global state. - */ -static void hp_end(TSRMLS_D) { - /* Bail if not ever enabled */ - if (!hp_globals.ever_enabled) { - return; - } - - /* Stop profiler if enabled */ - if (hp_globals.enabled) { - hp_stop(TSRMLS_C); - } - - /* Clean up state */ - hp_clean_profiler_state(TSRMLS_C); -} - -#define BEGIN_OUTPUT_JSON_FORMAT \ -"{\n" - -#define PROFILING_OUTPUT_JSON_FORMAT \ -" \"profiling\": {\n\ - \"magento_loading\": %f,\n\ - \"before_layout_loading\": %f,\n\ - \"layout_loading\": %f,\n\ - \"between_layout_loading_and_rendering\": %f,\n\ - \"layout_rendering\": %f,\n\ - \"after_layout_rendering\": %f,\n\ - \"before_sending_response\": %f\n\ - },\n" - -#define BLOCKS_BEGIN_OUTPUT_JSON_FORMAT \ -" \"blocks\": [" - -#define BLOCK_OUTPUT_JSON_FORMAT \ -"{\n\ - \"name\": \"%s\",\n\ - \"type\": \"%s\",\n\ - \"template\": \"%s\",\n\ - \"class\": \"%s\",\n\ - \"generate\": %f\n\ - \"renderize\": %f\n\ - }" - -#define BLOCKS_END_OUTPUT_JSON_FORMAT \ -"],\n" - -#define END_OUTPUT_JSON_FORMAT \ -" \"flag\": %x\n\ -}\n" - -static float cpu_cycles_to_ms(float cpufreq, long long start, long long end) { - // TODO check if it doesnt exceed long max value - if (!start && !end) - return -1.0; - if (!start) - return -2.0; - if (!end) - return -3.0; - return (end - start) / (cpufreq * 1000000) * 1000; -} - -#define OUTBUF_QUANTA_SIZE 2048 - -// returns ouput file FD or -1 -static int init_output(char *bufout) { - struct timeval tv; - return gettimeofday(&tv, NULL) == -1 || - snprintf(bufout, OUTBUF_QUANTA_SIZE, "/tmp/quanta-%d.%d-%d.txt", - tv.tv_sec, tv.tv_usec, getpid()) < 4 ? -1 : - open(bufout, O_WRONLY | O_APPEND | O_CREAT, 0644); -} - -// writes content into the output file and set the debug info if necessary -static void output(int size, char *bufout, int fd_log_out) { - if (size > 0 && write(fd_log_out, bufout, size) < 0) - hp_globals.quanta_dbg |= 0x10000; -} - -// begins the output -static void begin_output(int fd_log_out) { - output(strlen(BEGIN_OUTPUT_JSON_FORMAT), - BEGIN_OUTPUT_JSON_FORMAT, fd_log_out); -} - -// ouputs the profiling data -static void profiler_output(char *bufout, int fd_log_out, struct timeval *clock, monikor_metric_list_t *metrics, float cpufreq) { - long long *starts = hp_globals.monitored_function_tsc_start, - *stops = hp_globals.monitored_function_tsc_stop; - output(snprintf(bufout, OUTBUF_QUANTA_SIZE, - PROFILING_OUTPUT_JSON_FORMAT, - cpu_cycles_to_ms(cpufreq, starts[0], starts[1]), - cpu_cycles_to_ms(cpufreq, starts[1], starts[2]), - cpu_cycles_to_ms(cpufreq, starts[2], stops[2]), - cpu_cycles_to_ms(cpufreq, stops[2], starts[3]), - cpu_cycles_to_ms(cpufreq, starts[3], stops[3]), - cpu_cycles_to_ms(cpufreq, stops[3], stops[4]), - cpu_cycles_to_ms(cpufreq, stops[4], stops[5])), - bufout, fd_log_out); - monikor_metric_list_push(metrics, monikor_metric_float( - "magento.loading_time", clock, cpu_cycles_to_ms(cpufreq, starts[0], starts[1]), 0) - ); - monikor_metric_list_push(metrics, monikor_metric_float( - "magento.layout_loading_time", clock, cpu_cycles_to_ms(cpufreq, starts[2], stops[2]), 0) - ); - monikor_metric_list_push(metrics, monikor_metric_float( - "magento.layout_rendering_time", clock, cpu_cycles_to_ms(cpufreq, starts[3], stops[3]), 0) - ); -} - -// outputs a single block data -static void block_output(char *bufout, int fd_log_out, -float cpufreq, generate_renderize_block_details *block) { - output(snprintf(bufout, OUTBUF_QUANTA_SIZE, BLOCK_OUTPUT_JSON_FORMAT, - block->name, block->type, block->template, block->class, - cpu_cycles_to_ms(cpufreq, block->tsc_generate_start, block->tsc_generate_stop), - cpu_cycles_to_ms(cpufreq, block->tsc_renderize_first_start, block->tsc_renderize_last_stop)) - , bufout, fd_log_out); - if (block->name) efree(block->name); - if (block->type) efree(block->type); - if (block->template) efree(block->template); -} - -// outputs a blocks data -static void blocks_output(char *bufout, int fd_log_out, float cpufreq) { - output(strlen(BLOCKS_BEGIN_OUTPUT_JSON_FORMAT), - BLOCKS_BEGIN_OUTPUT_JSON_FORMAT, fd_log_out); - generate_renderize_block_details *current_block, *prev_block; - current_block = hp_globals.monitored_function_generate_renderize_block_first_linked_list; - while (current_block) { - block_output(bufout, fd_log_out, cpufreq, prev_block = current_block); - current_block = current_block->next_generate_renderize_block_detail; - if (current_block) output(2, ", ", fd_log_out); - efree(prev_block); - } - output(strlen(BLOCKS_END_OUTPUT_JSON_FORMAT), - BLOCKS_END_OUTPUT_JSON_FORMAT, fd_log_out); -} - -// ends output -static void end_output(char *bufout, int fd_log_out) { - output(snprintf(bufout, OUTBUF_QUANTA_SIZE, END_OUTPUT_JSON_FORMAT, - hp_globals.quanta_dbg), bufout, fd_log_out); -} - -static void restore_original_zend_execute(void) { - /* Remove proxies, restore the originals */ - #if PHP_VERSION_ID < 50500 - zend_execute = _zend_execute; - #else - zend_execute_ex = _zend_execute_ex; - #endif - zend_execute_internal = _zend_execute_internal; - zend_compile_file = _zend_compile_file; - zend_compile_string = _zend_compile_string; -} - -static void send_data_to_monikor(monikor_metric_list_t *metrics) { - void *data = NULL; - int sock; - size_t size; - struct sockaddr_un addr; - - if (!hp_globals.path_quanta_agent_socket) { - PRINTF_QUANTA("Cannot send data to monikor: socket not configured\n"); - return; - } - - addr.sun_family = AF_UNIX; - strcpy(addr.sun_path, hp_globals.path_quanta_agent_socket); - if (monikor_metric_list_serialize(metrics, &data, &size)) { - PRINTF_QUANTA("Cannot send data to monikor: cannot serialize metrics\n"); - free(data); - return; - } - if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) == -1 - || connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == -1 - || write(sock, data, size) == -1) { - PRINTF_QUANTA("Cannot send data to monikor: %s\n", strerror(errno)); - } - free(data); - close(sock); -} - -/** - * Called from quanta_mon_disable(). Removes all the proxies setup by - * hp_begin() and restores the original values. - */ -static void hp_stop(TSRMLS_D) { - char *bufout; - int hp_profile_flag = 1, fd_log_out; - - /* End any unfinished calls */ - while (hp_globals.entries) - END_PROFILING(&hp_globals.entries, hp_profile_flag, NULL); - restore_original_zend_execute(); - /* Resore cpu affinity. */ - restore_cpu_affinity(&hp_globals.prev_mask); - /* Stop profiling */ - hp_globals.enabled = 0; - if ((bufout = emalloc(OUTBUF_QUANTA_SIZE))) { - if ((fd_log_out = init_output(bufout)) > 0) { - float cpufreq; - monikor_metric_list_t *metrics; - struct timeval now; - - if (!hp_globals.cpu_frequencies - || !(metrics = monikor_metric_list_new())) { - PRINTF_QUANTA("Cannot initialize profling\n"); - return; - } - cpufreq = hp_globals.cpu_frequencies[hp_globals.cur_cpu_id]; - gettimeofday(&now, NULL); - begin_output(fd_log_out); - profiler_output(bufout, fd_log_out, &now, metrics, cpufreq); - blocks_output(bufout, fd_log_out, cpufreq); - end_output(bufout, fd_log_out); - close(fd_log_out); - send_data_to_monikor(metrics); - monikor_metric_list_free(metrics); - } - efree(bufout); - } -} - - -/** - * ***************************** - * QUANTA_MON ZVAL UTILITY FUNCTIONS - * ***************************** - */ - -/** Look in the PHP assoc array to find a key and return the zval associated - * with it. - * - * @author mpal - **/ -static zval *hp_zval_at_key(char *key, - zval *values) { - zval *result = NULL; - - if (values->type == IS_ARRAY) { - HashTable *ht; - zval **value; - uint len = strlen(key) + 1; - - ht = Z_ARRVAL_P(values); - if (zend_hash_find(ht, key, len, (void**)&value) == SUCCESS) { - result = *value; - } - } else { - result = NULL; - } - - return result; -} - -/** Convert the PHP array of strings to an emalloced array of strings. Note, - * this method duplicates the string data in the PHP array. - * - * @author mpal - **/ -static char **hp_strings_in_zval(zval *values) { - char **result; - size_t count; - size_t ix = 0; - - if (!values) { - return NULL; - } - - if (values->type == IS_ARRAY) { - HashTable *ht; - - ht = Z_ARRVAL_P(values); - count = zend_hash_num_elements(ht); - - if((result = - (char**)emalloc(sizeof(char*) * (count + 1))) == NULL) { - return result; - } - - for (zend_hash_internal_pointer_reset(ht); - zend_hash_has_more_elements(ht) == SUCCESS; - zend_hash_move_forward(ht)) { - char *str; - uint len; - ulong idx; - int type; - zval **data; - - type = zend_hash_get_current_key_ex(ht, &str, &len, &idx, 0, NULL); - /* Get the names stored in a standard array */ - if(type == HASH_KEY_IS_LONG) { - if ((zend_hash_get_current_data(ht, (void**)&data) == SUCCESS) && - Z_TYPE_PP(data) == IS_STRING && - strcmp(Z_STRVAL_PP(data), ROOT_SYMBOL)) { /* do not ignore "main" */ - result[ix] = estrdup(Z_STRVAL_PP(data)); - ix++; - } - } - } - } else if(values->type == IS_STRING) { - if((result = (char**)emalloc(sizeof(char*) * 2)) == NULL) { - return result; - } - result[0] = estrdup(Z_STRVAL_P(values)); - ix = 1; - } else { - result = NULL; - } - - /* NULL terminate the array */ - if (result != NULL) { - result[ix] = NULL; - } - - return result; -} - -/* Free this memory at the end of profiling */ -static inline void hp_array_del(char **name_array) { - if (name_array != NULL) { - int i = 0; - for(; name_array[i] != NULL && i < QUANTA_MON_MAX_IGNORED_FUNCTIONS; i++) { - efree(name_array[i]); - } - efree(name_array); - } -} diff --git a/extension/src/computed_functions_filter.c b/extension/src/computed_functions_filter.c deleted file mode 100644 index d209940..0000000 --- a/extension/src/computed_functions_filter.c +++ /dev/null @@ -1,418 +0,0 @@ -#include "quanta_mon.h" - -void hp_fill_monitored_functions(char **function_names) { - if (function_names[0] != NULL) return; - function_names[0] = "Magento\\Framework\\App\\Bootstrap::run"; - function_names[1] = "Magento\\Framework\\App\\Bootstrap::create"; - function_names[2] = "Magento\\Framework\\App\\Bootstrap::createApplication"; - function_names[3] = ""; - function_names[4] = "Magento\\Framework\\App\\Request\\Http::getFrontName"; - function_names[5] = ""; - function_names[6] = ""; - function_names[7] = "Magento\\Framework\\App\\FrontController\\Interceptor::dispatch"; - function_names[8] = "Magento\\Framework\\App\\Action\\Action::dispatch"; - function_names[9] = ""; - function_names[10] = "Magento\\Framework\\View\\Result\\Page\\Interceptor::renderResult"; - function_names[11] = ""; - function_names[12] = "Magento\\Framework\\App\\Response\\Http\\Interceptor::sendResponse"; - function_names[13] = ""; - function_names[14] = ""; - function_names[15] = "Magento\\Framework\\View\\Layout::_renderBlock"; - function_names[16] = "PDOStatement::execute"; - function_names[17] = "Magento\\Backend\\Controller\\Adminhtml\\Cache\\FlushAll::execute"; - function_names[18] = "Magento\\Framework\\App\\Cache\\TypeList::cleanType"; - function_names[19] = "Magento\\Backend\\Controller\\Adminhtml\\Cache\\FlushSystem::execute"; - function_names[20] = "Magento\\Indexer\\Model\\Indexer::reindexAll"; - function_names[21] = ""; - function_names[22] = NULL; -} - -int hp_match_monitored_function(const char* function_name, zend_execute_data* data TSRMLS_DC) { - ++hp_globals.internal_match_counters.total; - if (function_name[0] == 'g') { - if (function_name[1] == 'e') { - if (function_name[2] == 't') { - if (function_name[3] == 'F') { - if (function_name[4] == 'r') { - if (function_name[5] == 'o') { - if (function_name[6] == 'n') { - if (function_name[7] == 't') { - if (function_name[8] == 'N') { - if (function_name[9] == 'a') { - if (function_name[10] == 'm') { - if (function_name[11] == 'e') { - if (function_name[12] == '\0') { - ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); - if (!class_name) return -1; - if (!strcmp(class_name, "Magento\\Framework\\App\\Request\\Http")) return 4; - ++hp_globals.internal_match_counters.class_unmatched; - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - if (function_name[0] == 's') { - if (function_name[1] == 'e') { - if (function_name[2] == 'n') { - if (function_name[3] == 'd') { - if (function_name[4] == 'R') { - if (function_name[5] == 'e') { - if (function_name[6] == 's') { - if (function_name[7] == 'p') { - if (function_name[8] == 'o') { - if (function_name[9] == 'n') { - if (function_name[10] == 's') { - if (function_name[11] == 'e') { - if (function_name[12] == '\0') { - ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); - if (!class_name) return -1; - if (!strcmp(class_name, "Magento\\Framework\\App\\Response\\Http\\Interceptor")) return 12; - ++hp_globals.internal_match_counters.class_unmatched; - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - if (function_name[0] == '_') { - if (function_name[1] == 'r') { - if (function_name[2] == 'e') { - if (function_name[3] == 'n') { - if (function_name[4] == 'd') { - if (function_name[5] == 'e') { - if (function_name[6] == 'r') { - if (function_name[7] == 'B') { - if (function_name[8] == 'l') { - if (function_name[9] == 'o') { - if (function_name[10] == 'c') { - if (function_name[11] == 'k') { - if (function_name[12] == '\0') { - ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); - if (!class_name) return -1; - if (!strcmp(class_name, "Magento\\Framework\\View\\Layout")) return 15; - ++hp_globals.internal_match_counters.class_unmatched; - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - if (function_name[0] == 'c') { - if (function_name[1] == 'r') { - if (function_name[2] == 'e') { - if (function_name[3] == 'a') { - if (function_name[4] == 't') { - if (function_name[5] == 'e') { - if (function_name[6] == '\0') { - ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); - if (!class_name) return -1; - if (!strcmp(class_name, "Magento\\Framework\\App\\Bootstrap")) return 1; - ++hp_globals.internal_match_counters.class_unmatched; - return -1; - } - if (function_name[6] == 'A') { - if (function_name[7] == 'p') { - if (function_name[8] == 'p') { - if (function_name[9] == 'l') { - if (function_name[10] == 'i') { - if (function_name[11] == 'c') { - if (function_name[12] == 'a') { - if (function_name[13] == 't') { - if (function_name[14] == 'i') { - if (function_name[15] == 'o') { - if (function_name[16] == 'n') { - if (function_name[17] == '\0') { - ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); - if (!class_name) return -1; - if (!strcmp(class_name, "Magento\\Framework\\App\\Bootstrap")) return 2; - ++hp_globals.internal_match_counters.class_unmatched; - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - if (function_name[1] == 'l') { - if (function_name[2] == 'e') { - if (function_name[3] == 'a') { - if (function_name[4] == 'n') { - if (function_name[5] == 'T') { - if (function_name[6] == 'y') { - if (function_name[7] == 'p') { - if (function_name[8] == 'e') { - if (function_name[9] == '\0') { - ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); - if (!class_name) return -1; - if (!strcmp(class_name, "Magento\\Framework\\App\\Cache\\TypeList")) return 18; - ++hp_globals.internal_match_counters.class_unmatched; - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - if (function_name[0] == 'e') { - if (function_name[1] == 'x') { - if (function_name[2] == 'e') { - if (function_name[3] == 'c') { - if (function_name[4] == 'u') { - if (function_name[5] == 't') { - if (function_name[6] == 'e') { - if (function_name[7] == '\0') { - ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); - if (!class_name) return -1; - if (!strcmp(class_name, "PDOStatement")) return 16; - if (!strcmp(class_name, "Magento\\Backend\\Controller\\Adminhtml\\Cache\\FlushAll")) return 17; - if (!strcmp(class_name, "Magento\\Backend\\Controller\\Adminhtml\\Cache\\FlushSystem")) return 19; - ++hp_globals.internal_match_counters.class_unmatched; - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - if (function_name[0] == 'd') { - if (function_name[1] == 'i') { - if (function_name[2] == 's') { - if (function_name[3] == 'p') { - if (function_name[4] == 'a') { - if (function_name[5] == 't') { - if (function_name[6] == 'c') { - if (function_name[7] == 'h') { - if (function_name[8] == '\0') { - ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); - if (!class_name) return -1; - if (!strcmp(class_name, "Magento\\Framework\\App\\FrontController\\Interceptor")) return 7; - if (!strcmp(class_name, "Magento\\Framework\\App\\Action\\Action")) return 8; - ++hp_globals.internal_match_counters.class_unmatched; - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - if (function_name[0] == 'r') { - if (function_name[1] == 'e') { - if (function_name[2] == 'n') { - if (function_name[3] == 'd') { - if (function_name[4] == 'e') { - if (function_name[5] == 'r') { - if (function_name[6] == 'R') { - if (function_name[7] == 'e') { - if (function_name[8] == 's') { - if (function_name[9] == 'u') { - if (function_name[10] == 'l') { - if (function_name[11] == 't') { - if (function_name[12] == '\0') { - ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); - if (!class_name) return -1; - if (!strcmp(class_name, "Magento\\Framework\\View\\Result\\Page\\Interceptor")) return 10; - ++hp_globals.internal_match_counters.class_unmatched; - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - if (function_name[2] == 'i') { - if (function_name[3] == 'n') { - if (function_name[4] == 'd') { - if (function_name[5] == 'e') { - if (function_name[6] == 'x') { - if (function_name[7] == 'A') { - if (function_name[8] == 'l') { - if (function_name[9] == 'l') { - if (function_name[10] == '\0') { - ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); - if (!class_name) return -1; - if (!strcmp(class_name, "Magento\\Indexer\\Model\\Indexer")) return 20; - ++hp_globals.internal_match_counters.class_unmatched; - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; - } - if (function_name[1] == 'u') { - if (function_name[2] == 'n') { - if (function_name[3] == '\0') { - ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); - if (!class_name) return -1; - if (!strcmp(class_name, "Magento\\Framework\\App\\Bootstrap")) return 0; - ++hp_globals.internal_match_counters.class_unmatched; - return -1; - } - return -1; - } - return -1; - } - return -1; - } - return -1; -} diff --git a/extension/tools/benchmark.c b/extension/tools/benchmark.c deleted file mode 100644 index 35eede1..0000000 --- a/extension/tools/benchmark.c +++ /dev/null @@ -1,124 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include "computed_functions_filter.c" - -int count_lines(char *str) { - int count = 0; - while (*str) { - if (*str == '\n') - ++count; - ++str; - } - return count; -} - -struct method { - char *function_name; - char *class_name; -}; - -struct method *get_methods(void) { - struct stat sb; - char *content; - struct method *lines; - struct method *ret; - int fd; - - fd = open("/Users/Kraoz/Downloads/suce-1.log", O_RDONLY); - fstat(fd, &sb); - content = malloc(sb.st_size); - read(fd, content, sb.st_size); - ret = lines = malloc((count_lines(content) + 1) * sizeof(*lines)); - lines->function_name = content; - while (*content) { - if (*content == ' ') { - *content = '\0'; - lines->class_name = content + 1; - } else if (*content == '\n') { - *content = '\0'; - ++lines; - lines->function_name = content + 1; - } - ++content; - } - lines->function_name = NULL; - return ret; -} - -#define INDEX_2_BYTE(index) (index >> 3) -#define INDEX_2_BIT(index) (1 << (index & 0x7)); -#define QUANTA_MON_MAX_MONITORED_FUNCTIONS_HASH 256 -#define QUANTA_MON_MAX_MONITORED_FUNCTIONS 23 -#define QUANTA_MON_MONITORED_FUNCTION_FILTER_SIZE ((QUANTA_MON_MAX_MONITORED_FUNCTIONS_HASH + 7)/8) - -typedef unsigned long ulong; - -inline uint8_t hp_inline_hash(char * str) { - ulong h = 5381; - uint i = 0; - uint8_t res = 0; - - while (*str) - h = (h + (h << 5)) ^ (ulong)*str++; - - for (i = 0; i < sizeof(ulong); i++) - res += ((uint8_t *)&h)[i]; - return res; -} - -void hp_monitored_functions_filter_init(char **functions, uint8_t *monitored_function_filter) { - for(int i = 0; functions[i] != NULL; i++) { - if (!*functions[i]) continue; - char *str = strstr(functions[i], "::"); - uint8_t hash = hp_inline_hash(str ? str + 2 : functions[i]); - int idx = INDEX_2_BYTE(hash); - monitored_function_filter[idx] |= INDEX_2_BIT(hash); - } -} - -int hp_monitored_functions_filter_collision(uint8_t hash, uint8_t *monitored_function_filter) { - uint8_t mask = INDEX_2_BIT(hash); - return monitored_function_filter[INDEX_2_BYTE(hash)] & mask; -} - -int main(int argc, char const *argv[]) { - uint8_t monitored_function_filter[QUANTA_MON_MONITORED_FUNCTION_FILTER_SIZE]; - char *monitored_functions[QUANTA_MON_MAX_MONITORED_FUNCTIONS]; - struct method *methods = get_methods(); - struct method *methods_save = methods; - struct timeval start, end; - int count = 0; - - bzero(monitored_function_filter, QUANTA_MON_MONITORED_FUNCTION_FILTER_SIZE); - hp_fill_monitored_functions(monitored_functions); - hp_monitored_functions_filter_init(monitored_functions, monitored_function_filter); - gettimeofday(&start, NULL); - while (methods->function_name) { - // printf("Matching %s::%s\n", methods->function_name, methods->class_name); - if (hp_match_monitored_function(methods->function_name, methods->class_name) != -1) - ++count; - ++methods; - } - gettimeofday(&end, NULL); - printf("%d count, %fms\n", count, ((end.tv_sec - - start.tv_sec) * 1000000 + end.tv_usec - start.tv_usec) / 1000.0); - methods = methods_save; - count = 0; - gettimeofday(&start, NULL); - while (methods->function_name) { - if (hp_monitored_functions_filter_collision( - hp_inline_hash(methods->function_name), monitored_function_filter)) - ++count; - ++methods; - } - gettimeofday(&end, NULL); - printf("%d count, %fms\n", count, ((end.tv_sec - - start.tv_sec) * 1000000 + end.tv_usec - start.tv_usec) / 1000.0); - return 0; -} From 974721b368f5c209894870ade25a923656c04027 Mon Sep 17 00:00:00 2001 From: Matthieu Rosinski Date: Thu, 3 Aug 2023 17:31:57 +0200 Subject: [PATCH 26/60] cleanup TSRMLS_* macros usage (deprecated in PHP7) --- extension/gen_app_trees.rb | 8 +- extension/include/magento1.h | 10 +- extension/include/magento2.h | 8 +- extension/include/magento_common.h | 22 +-- extension/include/oro.h | 14 +- extension/include/profiler.h | 71 +++++----- extension/include/utils.h | 22 +-- extension/src/applications.c | 130 +++++++++--------- extension/src/magento1/blocks.c | 12 +- extension/src/magento1/events.c | 14 +- extension/src/magento1/version.c | 6 +- extension/src/magento2/blocks.c | 18 +-- extension/src/magento2/events.c | 8 +- extension/src/magento2/version.c | 8 +- extension/src/magento_common/blocks.c | 10 +- extension/src/magento_common/context.c | 6 +- extension/src/magento_common/events.c | 4 +- extension/src/magento_common/metrics.c | 4 +- extension/src/magento_common/model_data.c | 6 +- extension/src/magento_common/sql.c | 4 +- extension/src/module/module_init.c | 2 +- extension/src/module/request_init.c | 20 +-- extension/src/module/request_shutdown.c | 2 +- extension/src/oro/blocks.c | 12 +- extension/src/oro/context.c | 6 +- extension/src/oro/metrics.c | 4 +- extension/src/oro/sql.c | 4 +- extension/src/oro/version.c | 8 +- extension/src/profiler/app_profiler.c | 12 +- extension/src/profiler/application.c | 8 +- extension/src/profiler/begin_profiling.c | 6 +- extension/src/profiler/end_profiling.c | 6 +- extension/src/profiler/events_metrics.c | 2 +- extension/src/profiler/hier_profiler.c | 22 +-- extension/src/profiler/hp_begin.c | 6 +- extension/src/profiler/hp_end.c | 12 +- extension/src/profiler/profiler_clean.c | 2 +- extension/src/profiler/profiler_init.c | 2 +- extension/src/profiler/profiling_metrics.c | 2 +- extension/src/profiler/record_sql_query.c | 10 +- .../src/profiler/selfprofiling_metrics.c | 2 +- extension/src/profiler/send_metrics.c | 14 +- extension/src/profiler/zend_execute.c | 81 ++++++----- extension/src/profiler/zend_functions_info.c | 14 +- extension/src/utils/profiler.c | 2 +- extension/src/utils/safe_call_function.c | 26 ++-- extension/src/utils/safe_get_constant.c | 2 +- extension/src/utils/this.c | 8 +- extension/src/utils/zend_obj.c | 10 +- 49 files changed, 348 insertions(+), 344 deletions(-) diff --git a/extension/gen_app_trees.rb b/extension/gen_app_trees.rb index 95d4665..becfb56 100755 --- a/extension/gen_app_trees.rb +++ b/extension/gen_app_trees.rb @@ -47,7 +47,7 @@ def print depth, text def compile_node app_name, node, depth = 0 if node[:children].empty? print depth, "++hp_globals.internal_match_counters.function;" - print depth, "const char *class_name = hp_get_class_name(data TSRMLS_CC);"; + print depth, "const char *class_name = hp_get_class_name(data);"; print depth, "if (!class_name) return NULL;" node[:value].each do |value| print depth, "if (!strcmp(class_name, \"#{value[:class_name].gsub '\\', '\\\\\\\\'}\"))" @@ -64,7 +64,7 @@ def compile_node app_name, node, depth = 0 end def compile_tree app_name, tree - puts "profiled_function_t *#{app_name}_match_function(const char* function_name, zend_execute_data* data TSRMLS_DC) {" + puts "profiled_function_t *#{app_name}_match_function(const char* function_name, zend_execute_data* data) {" puts " ++hp_globals.internal_match_counters.total;" compile_node app_name, tree puts "}" @@ -153,7 +153,7 @@ def compile_profiled_application name, app def compile_app_first_node node, depth = 0 if node[:children].empty? print depth, "++hp_globals.internal_match_counters.function;" - print depth, "const char *class_name = hp_get_class_name(data TSRMLS_CC);"; + print depth, "const char *class_name = hp_get_class_name(data);"; print depth, "if (!class_name) return NULL;" node[:value].each do |value| print depth, "if (!strcmp(class_name, \"#{value[:class_name].gsub '\\', '\\\\\\\\'}\"))" @@ -171,7 +171,7 @@ def compile_app_first_node node, depth = 0 def compile_app_first_tree tree puts "profiled_application_t *qm_match_first_app_function(const char* function_name," - puts "zend_execute_data* data TSRMLS_DC) {" + puts "zend_execute_data* data) {" puts " ++hp_globals.internal_match_counters.total;" compile_app_first_node tree puts "}" diff --git a/extension/include/magento1.h b/extension/include/magento1.h index e03b321..071ed1d 100644 --- a/extension/include/magento1.h +++ b/extension/include/magento1.h @@ -2,16 +2,16 @@ #define QM_MAGENTO1_H_ int magento1_record_reindex_event(profiled_application_t *app, profiled_function_t *function, - zend_execute_data *execute_data TSRMLS_DC); + zend_execute_data *execute_data); int magento1_record_cache_clean_event(profiled_application_t *app, profiled_function_t *function, - zend_execute_data *execute_data TSRMLS_DC); + zend_execute_data *execute_data); int magento1_record_process_index_event(profiled_application_t *app, profiled_function_t *function, - zend_execute_data *execute_data TSRMLS_DC); + zend_execute_data *execute_data); int magento1_block_before_render(profiled_application_t *app, profiled_function_t *function, - zend_execute_data *execute_data TSRMLS_DC); + zend_execute_data *execute_data); int magento1_fetch_version(profiled_application_t *app, profiled_function_t *function, - zend_execute_data *data TSRMLS_DC); + zend_execute_data *data); #endif /* end of include guard: QM_MAGENTO1_H_ */ diff --git a/extension/include/magento2.h b/extension/include/magento2.h index 430e8f6..982946c 100644 --- a/extension/include/magento2.h +++ b/extension/include/magento2.h @@ -2,14 +2,14 @@ #define QM_MAGENTO2_H_ int magento2_block_before_render(profiled_application_t *app, profiled_function_t *function, - zend_execute_data *execute_data TSRMLS_DC); + zend_execute_data *execute_data); int magento2_record_reindex_event(profiled_application_t *app, profiled_function_t *function, - zend_execute_data *execute_data TSRMLS_DC); + zend_execute_data *execute_data); int magento2_record_cache_clean_event(profiled_application_t *app, profiled_function_t *function, - zend_execute_data *execute_data TSRMLS_DC); + zend_execute_data *execute_data); int magento2_fetch_version(profiled_application_t *app, profiled_function_t *function, - zend_execute_data *ex TSRMLS_DC); + zend_execute_data *ex); #endif /* end of include guard: QM_MAGENTO2_H_ */ diff --git a/extension/include/magento_common.h b/extension/include/magento_common.h index 552fecf..4627173 100644 --- a/extension/include/magento_common.h +++ b/extension/include/magento_common.h @@ -36,26 +36,26 @@ magento_block_t *block_stack_pop(magento_context_t *context); magento_block_t *block_stack_top(magento_context_t *context); void block_stack_push(magento_context_t *context, magento_block_t *block); -char *magento_get_block_class_name(zval *block TSRMLS_DC); +char *magento_get_block_class_name(zval *block); char *magento_get_block_class_file(zval *block); -char *magento_get_block_attr(const char *key, size_t key_len, zval *this TSRMLS_DC); +char *magento_get_block_attr(const char *key, size_t key_len, zval *this); int magento_block_after_render(profiled_application_t *app, profiled_function_t *function, - zend_execute_data *execute_data TSRMLS_DC); + zend_execute_data *execute_data); -char *get_mage_model_data(HashTable *attrs, char *key TSRMLS_DC); -zval *get_mage_model_zdata(HashTable *attrs, char *key, int type TSRMLS_DC); +char *get_mage_model_data(HashTable *attrs, char *key); +zval *get_mage_model_zdata(HashTable *attrs, char *key, int type); int magento_record_cache_system_flush_event(profiled_application_t *app, - profiled_function_t *function, zend_execute_data *execute_data TSRMLS_DC); + profiled_function_t *function, zend_execute_data *execute_data); int magento_record_cache_flush_event(profiled_application_t *app, profiled_function_t *function, - zend_execute_data *execute_data TSRMLS_DC); + zend_execute_data *execute_data); int magento_record_sql_query(profiled_application_t *app, profiled_function_t *function, - zend_execute_data *data TSRMLS_DC); + zend_execute_data *data); -void *magento_init_context(profiled_application_t *app TSRMLS_DC); -void magento_cleanup_context(profiled_application_t *app TSRMLS_DC); +void *magento_init_context(profiled_application_t *app); +void magento_cleanup_context(profiled_application_t *app); void magento_send_metrics(profiled_application_t *app, monikor_metric_list_t *metrics, - float cpufreq, struct timeval *clock TSRMLS_DC); + float cpufreq, struct timeval *clock); #endif /* end of include guard: QM_MAGENTO_COMMON_H_ */ diff --git a/extension/include/oro.h b/extension/include/oro.h index db7680d..2649ffb 100644 --- a/extension/include/oro.h +++ b/extension/include/oro.h @@ -30,20 +30,20 @@ typedef struct { } oro_context_t; // Context -void *oro_init_context(profiled_application_t *app TSRMLS_DC); -void oro_cleanup_context(profiled_application_t *app TSRMLS_DC); +void *oro_init_context(profiled_application_t *app); +void oro_cleanup_context(profiled_application_t *app); // Callbacks int oro_fetch_version(profiled_application_t *app, profiled_function_t *function, - zend_execute_data *ex TSRMLS_DC); + zend_execute_data *ex); int oro_before_render_block(profiled_application_t *app, profiled_function_t *function, - zend_execute_data *ex TSRMLS_DC); + zend_execute_data *ex); int oro_after_render_block(profiled_application_t *app, profiled_function_t *function, - zend_execute_data *ex TSRMLS_DC); + zend_execute_data *ex); int oro_record_sql_query(profiled_application_t *app, profiled_function_t *function, - zend_execute_data *data TSRMLS_DC); + zend_execute_data *data); void oro_send_metrics(profiled_application_t *app, monikor_metric_list_t *metrics, - float cpufreq, struct timeval *clock TSRMLS_DC); + float cpufreq, struct timeval *clock); // Block stack oro_block_t *oro_block_stack_pop(oro_context_t *context); diff --git a/extension/include/profiler.h b/extension/include/profiler.h index 5d886b5..8728e18 100644 --- a/extension/include/profiler.h +++ b/extension/include/profiler.h @@ -66,7 +66,7 @@ typedef struct profiled_application_t profiled_application_t; typedef struct profiled_function_t profiled_function_t; typedef int (*profiled_function_callback_t)(profiled_application_t *app, profiled_function_t *func, - zend_execute_data *ex TSRMLS_DC); + zend_execute_data *ex); struct profiled_function_t { const char *name; @@ -132,50 +132,50 @@ struct profiled_application_t { void *context; - void *(*create_context)(struct profiled_application_t *app TSRMLS_DC); - void (*cleanup_context)(struct profiled_application_t *app TSRMLS_DC); - profiled_function_t *(*match_function)(const char *name, zend_execute_data *data TSRMLS_DC); + void *(*create_context)(struct profiled_application_t *app); + void (*cleanup_context)(struct profiled_application_t *app); + profiled_function_t *(*match_function)(const char *name, zend_execute_data *data); void (*send_metrics)(struct profiled_application_t *app, monikor_metric_list_t *metrics, - float cpufreq, struct timeval *clock TSRMLS_DC); + float cpufreq, struct timeval *clock); }; // Profiling -void hp_begin(long level TSRMLS_DC); -void hp_stop(TSRMLS_D); -void hp_end(TSRMLS_D); -void hp_init_profiler_state(int level TSRMLS_DC); -void hp_clean_profiler_state(TSRMLS_D); +void hp_begin(long level); +void hp_stop(void); +void hp_end(void); +void hp_init_profiler_state(int level); +void hp_clean_profiler_state(void); void hp_hijack_zend_execute(long level); void hp_restore_original_zend_execute(void); -void hp_inc_count(zval *counts, char *name, long count TSRMLS_DC); +void hp_inc_count(zval *counts, char *name, long count); size_t hp_get_entry_name(hp_entry_t *entry, char *result_buf, size_t result_len); size_t hp_get_function_stack(hp_entry_t *entry, int level, char *result_buf, size_t result_len); -int hp_begin_profiling(hp_entry_t **entries, const char *symbol, zend_execute_data *data TSRMLS_DC); -void hp_end_profiling(hp_entry_t **entries, int profile_curr, zend_execute_data *data TSRMLS_DC); -int qm_begin_profiling(const char *curr_func, zend_execute_data *execute_data TSRMLS_DC); -int qm_end_profiling(int function_idx, zend_execute_data *execute_data TSRMLS_DC); -void hp_hier_begin_profiling(hp_entry_t **entries, hp_entry_t *current TSRMLS_DC); -void hp_hier_end_profiling(hp_entry_t **entries TSRMLS_DC); +int hp_begin_profiling(hp_entry_t **entries, const char *symbol, zend_execute_data *data); +void hp_end_profiling(hp_entry_t **entries, int profile_curr, zend_execute_data *data); +int qm_begin_profiling(const char *curr_func, zend_execute_data *execute_data); +int qm_end_profiling(int function_idx, zend_execute_data *execute_data); +void hp_hier_begin_profiling(hp_entry_t **entries, hp_entry_t *current ); +void hp_hier_end_profiling(hp_entry_t **entries ); // Metrics stuff -void send_metrics(TSRMLS_D); -void qm_send_events_metrics(struct timeval *clock, monikor_metric_list_t *metrics TSRMLS_DC); +void send_metrics(void); +void qm_send_events_metrics(struct timeval *clock, monikor_metric_list_t *metrics); void qm_send_profiler_metrics(struct timeval *clock, monikor_metric_list_t *metrics, - float cpufreq TSRMLS_DC); + float cpufreq); void qm_send_selfprofiling_metrics(struct timeval *clock, monikor_metric_list_t *metrics, - float cpufreq TSRMLS_DC); + float cpufreq); // Application stuff profiled_application_t *qm_match_first_app_function(const char* function_name, - zend_execute_data* data TSRMLS_DC); -void init_profiled_application(profiled_application_t *app TSRMLS_DC); -void clean_profiled_application(profiled_application_t *app TSRMLS_DC); + zend_execute_data* data); +void init_profiled_application(profiled_application_t *app); +void clean_profiled_application(profiled_application_t *app); int qm_record_event(applicative_event_class_t class, char *type, char *subtype); int qm_record_sql_query(profiled_application_t *app, profiled_function_t *function, - zend_execute_data *data TSRMLS_DC); + zend_execute_data *data); // HP list void hp_free_the_free_list(); @@ -184,18 +184,25 @@ void hp_fast_free_hprof_entry(hp_entry_t *p); // Zend hijacks #if PHP_VERSION_ID < 50500 -ZEND_DLEXPORT void hp_execute (zend_op_array *ops TSRMLS_DC); -ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data, int ret TSRMLS_DC); +ZEND_DLEXPORT void hp_execute (zend_op_array *ops); +ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data, int ret); #elif PHP_MAJOR_VERSION < 7 -ZEND_DLEXPORT void hp_execute_ex (zend_execute_data *execute_data TSRMLS_DC); +ZEND_DLEXPORT void hp_execute_ex (zend_execute_data *execute_data); ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data, - struct _zend_fcall_info *fci, int ret TSRMLS_DC); + struct _zend_fcall_info *fci, int ret); #else -ZEND_DLEXPORT void hp_execute_ex (zend_execute_data *execute_data TSRMLS_DC); +ZEND_DLEXPORT void hp_execute_ex (zend_execute_data *execute_data); ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data, zval *return_value); #endif -ZEND_DLEXPORT zend_op_array* hp_compile_file(zend_file_handle *file_handle, int type TSRMLS_DC); -ZEND_DLEXPORT zend_op_array* hp_compile_string(zval *source_string, char *filename TSRMLS_DC); +ZEND_DLEXPORT zend_op_array* hp_compile_file(zend_file_handle *file_handle, int type); +#if PHP_VERSION_ID >= 80200 +ZEND_DLEXPORT zend_op_array* hp_compile_string(zend_string *source_string, const char *filename, zend_compile_position position); +#elif PHP_VERSION_ID >= 80000 +ZEND_DLEXPORT zend_op_array* hp_compile_string(zend_string *source_string, const char *filename); +#else +ZEND_DLEXPORT zend_op_array* hp_compile_string(zval *source_string, char *filename); +#endif + #endif /* end of include guard: QM_PROFILER_H_ */ diff --git a/extension/include/utils.h b/extension/include/utils.h index 4b397aa..2f6aa56 100644 --- a/extension/include/utils.h +++ b/extension/include/utils.h @@ -21,27 +21,27 @@ zval *zend_read_property_compat(zend_class_entry *ce, zval *obj, const char *nam // Safe helpers int safe_call_function(char *function, zval *ret, int ret_type, - size_t params_count, zval params[] TSRMLS_DC); + size_t params_count, zval params[]); int safe_call_method(zval *object, char *function, zval *ret, int ret_type, - size_t params_count, zval params[] TSRMLS_DC); + size_t params_count, zval params[]); zval *safe_get_argument(zend_execute_data *ex, size_t num, int type); -zval *safe_get_constant(const char *name, int type TSRMLS_DC); +zval *safe_get_constant(const char *name, int type); // This helpers -zval *get_this(zend_execute_data *execute_data TSRMLS_DC); -zval *get_prev_this(zend_execute_data *execute_data TSRMLS_DC); +zval *get_this(zend_execute_data *execute_data); +zval *get_prev_this(zend_execute_data *execute_data); // Object helpers -const char *get_obj_class_name(zval *obj TSRMLS_DC); -int safe_new(char *class, zval *ret, int params_count, zval params[] TSRMLS_DC); -int safe_get_class_constant(char *class, char *name, zval *ret, int type TSRMLS_DC); +const char *get_obj_class_name(zval *obj); +int safe_new(char *class, zval *ret, int params_count, zval params[]); +int safe_get_class_constant(char *class, char *name, zval *ret, int type); uint8_t hp_inline_hash(const char *str); const char *hp_get_base_filename(const char *filename); -char *hp_get_function_name(zend_execute_data *data TSRMLS_DC); -char *hp_get_function_name_fast(zend_execute_data *execute_data TSRMLS_DC); -const char *hp_get_class_name(zend_execute_data *data TSRMLS_DC); +char *hp_get_function_name(zend_execute_data *data); +char *hp_get_function_name_fast(zend_execute_data *execute_data); +const char *hp_get_class_name(zend_execute_data *data); #endif /* end of include guard: QM_UTILS_H_ */ diff --git a/extension/src/applications.c b/extension/src/applications.c index dfaceed..508f5fd 100644 --- a/extension/src/applications.c +++ b/extension/src/applications.c @@ -181,7 +181,7 @@ static const profiler_timer_t orocommerce_profiler_timers[] = { {NULL, NULL, 0, NULL, 0, {0}} }; -profiled_function_t *orocommerce_match_function(const char* function_name, zend_execute_data* data TSRMLS_DC) { +profiled_function_t *orocommerce_match_function(const char* function_name, zend_execute_data* data) { ++hp_globals.internal_match_counters.total; if (function_name[0] == 'b') { if (function_name[1] == 'o') { @@ -189,7 +189,7 @@ profiled_function_t *orocommerce_match_function(const char* function_name, zend_ if (function_name[3] == 't') { if (function_name[4] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Oro\\Bundle\\DistributionBundle\\OroKernel")) return &orocommerce_profiled_functions[0]; @@ -212,7 +212,7 @@ profiled_function_t *orocommerce_match_function(const char* function_name, zend_ if (function_name[5] == 'e') { if (function_name[6] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Symfony\\Component\\HttpKernel\\HttpKernel")) return &orocommerce_profiled_functions[1]; @@ -248,7 +248,7 @@ profiled_function_t *orocommerce_match_function(const char* function_name, zend_ if (function_name[14] == 't') { if (function_name[15] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Symfony\\Component\\HttpKernel\\EventListener\\RouterListener")) return &orocommerce_profiled_functions[2]; @@ -275,7 +275,7 @@ profiled_function_t *orocommerce_match_function(const char* function_name, zend_ if (function_name[11] == 'w') { if (function_name[12] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Oro\\Bundle\\LayoutBundle\\EventListener\\LayoutListener")) return &orocommerce_profiled_functions[4]; @@ -321,7 +321,7 @@ profiled_function_t *orocommerce_match_function(const char* function_name, zend_ if (function_name[12] == 'r') { if (function_name[13] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver")) return &orocommerce_profiled_functions[3]; @@ -356,7 +356,7 @@ profiled_function_t *orocommerce_match_function(const char* function_name, zend_ if (function_name[8] == 't') { if (function_name[9] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Oro\\Bundle\\LayoutBundle\\Layout\\LayoutManager")) return &orocommerce_profiled_functions[5]; @@ -387,6 +387,15 @@ profiled_function_t *orocommerce_match_function(const char* function_name, zend_ if (function_name[3] == 'd') { if (function_name[4] == 'e') { if (function_name[5] == 'r') { + if (function_name[6] == '\0') { + ++hp_globals.internal_match_counters.function; + const char *class_name = hp_get_class_name(data); + if (!class_name) return NULL; + if (!strcmp(class_name, "Oro\\Component\\Layout\\Layout")) + return &orocommerce_profiled_functions[6]; + ++hp_globals.internal_match_counters.class_unmatched; + return NULL; + } if (function_name[6] == 'B') { if (function_name[7] == 'l') { if (function_name[8] == 'o') { @@ -394,7 +403,7 @@ profiled_function_t *orocommerce_match_function(const char* function_name, zend_ if (function_name[10] == 'k') { if (function_name[11] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Oro\\Bundle\\LayoutBundle\\Form\\TwigRendererEngine")) return &orocommerce_profiled_functions[10]; @@ -411,15 +420,6 @@ profiled_function_t *orocommerce_match_function(const char* function_name, zend_ } return NULL; } - if (function_name[6] == '\0') { - ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); - if (!class_name) return NULL; - if (!strcmp(class_name, "Oro\\Component\\Layout\\Layout")) - return &orocommerce_profiled_functions[6]; - ++hp_globals.internal_match_counters.class_unmatched; - return NULL; - } return NULL; } return NULL; @@ -448,7 +448,7 @@ profiled_function_t *orocommerce_match_function(const char* function_name, zend_ if (function_name[13] == 'e') { if (function_name[14] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Symfony\\Component\\HttpKernel\\HttpKernel")) return &orocommerce_profiled_functions[7]; @@ -489,7 +489,7 @@ profiled_function_t *orocommerce_match_function(const char* function_name, zend_ if (function_name[3] == 'd') { if (function_name[4] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Symfony\\Component\\HttpFoundation\\Response")) return &orocommerce_profiled_functions[8]; @@ -515,7 +515,7 @@ profiled_function_t *orocommerce_match_function(const char* function_name, zend_ if (function_name[8] == 'e') { if (function_name[9] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Symfony\\Component\\HttpKernel\\Kernel")) return &orocommerce_profiled_functions[9]; @@ -549,7 +549,7 @@ profiled_function_t *orocommerce_match_function(const char* function_name, zend_ if (function_name[6] == 'e') { if (function_name[7] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "PDOStatement")) return &orocommerce_profiled_functions[11]; @@ -823,7 +823,7 @@ static const profiler_timer_t magento2_profiler_timers[] = { {NULL, NULL, 0, NULL, 0, {0}} }; -profiled_function_t *magento2_match_function(const char* function_name, zend_execute_data* data TSRMLS_DC) { +profiled_function_t *magento2_match_function(const char* function_name, zend_execute_data* data) { ++hp_globals.internal_match_counters.total; if (function_name[0] == 's') { if (function_name[1] == 'e') { @@ -839,7 +839,7 @@ profiled_function_t *magento2_match_function(const char* function_name, zend_exe if (function_name[11] == 'e') { if (function_name[12] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Magento\\Framework\\App\\Response\\Http\\Interceptor")) return &magento2_profiled_functions[8]; @@ -884,7 +884,7 @@ profiled_function_t *magento2_match_function(const char* function_name, zend_exe if (function_name[11] == 'e') { if (function_name[12] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Magento\\Framework\\App\\Request\\Http")) return &magento2_profiled_functions[3]; @@ -929,7 +929,7 @@ profiled_function_t *magento2_match_function(const char* function_name, zend_exe if (function_name[11] == 'k') { if (function_name[12] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Magento\\Framework\\View\\Layout")) return &magento2_profiled_functions[9]; @@ -968,7 +968,7 @@ profiled_function_t *magento2_match_function(const char* function_name, zend_exe if (function_name[5] == 'e') { if (function_name[6] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Magento\\Framework\\App\\Bootstrap")) return &magento2_profiled_functions[1]; @@ -988,7 +988,7 @@ profiled_function_t *magento2_match_function(const char* function_name, zend_exe if (function_name[16] == 'n') { if (function_name[17] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Magento\\Framework\\App\\Bootstrap")) return &magento2_profiled_functions[2]; @@ -1037,7 +1037,7 @@ profiled_function_t *magento2_match_function(const char* function_name, zend_exe if (function_name[8] == 'e') { if (function_name[9] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Magento\\Framework\\App\\Cache\\TypeList")) return &magento2_profiled_functions[12]; @@ -1071,7 +1071,7 @@ profiled_function_t *magento2_match_function(const char* function_name, zend_exe if (function_name[6] == 'e') { if (function_name[7] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "PDOStatement")) return &magento2_profiled_functions[14]; @@ -1106,14 +1106,14 @@ profiled_function_t *magento2_match_function(const char* function_name, zend_exe if (function_name[7] == 'h') { if (function_name[8] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Magento\\Framework\\App\\Action\\Action")) return &magento2_profiled_functions[6]; - if (!strcmp(class_name, "Magento\\Framework\\App\\FrontController")) - return &magento2_profiled_functions[5]; if (!strcmp(class_name, "Magento\\Framework\\App\\FrontController\\Interceptor")) return &magento2_profiled_functions[4]; + if (!strcmp(class_name, "Magento\\Framework\\App\\FrontController")) + return &magento2_profiled_functions[5]; ++hp_globals.internal_match_counters.class_unmatched; return NULL; } @@ -1147,7 +1147,7 @@ profiled_function_t *magento2_match_function(const char* function_name, zend_exe if (function_name[11] == 't') { if (function_name[12] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Magento\\Framework\\View\\Result\\Page\\Interceptor")) return &magento2_profiled_functions[7]; @@ -1184,7 +1184,7 @@ profiled_function_t *magento2_match_function(const char* function_name, zend_exe if (function_name[9] == 'l') { if (function_name[10] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Magento\\Indexer\\Model\\Indexer")) return &magento2_profiled_functions[13]; @@ -1213,7 +1213,7 @@ profiled_function_t *magento2_match_function(const char* function_name, zend_exe if (function_name[2] == 'n') { if (function_name[3] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Magento\\Framework\\App\\Bootstrap")) return &magento2_profiled_functions[0]; @@ -1595,7 +1595,7 @@ static const profiler_timer_t magento_profiler_timers[] = { {NULL, NULL, 0, NULL, 0, {0}} }; -profiled_function_t *magento_match_function(const char* function_name, zend_execute_data* data TSRMLS_DC) { +profiled_function_t *magento_match_function(const char* function_name, zend_execute_data* data) { ++hp_globals.internal_match_counters.total; if (function_name[0] == 'c') { if (function_name[1] == 'l') { @@ -1608,7 +1608,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[8] == 'e') { if (function_name[9] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Model_Cache")) return &magento_profiled_functions[21]; @@ -1646,7 +1646,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[10] == 't') { if (function_name[11] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Model_App")) return &magento_profiled_functions[0]; @@ -1689,7 +1689,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[14] == 'g') { if (function_name[15] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Model_App")) return &magento_profiled_functions[2]; @@ -1723,7 +1723,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[9] == 'e') { if (function_name[10] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Model_App")) return &magento_profiled_functions[3]; @@ -1748,7 +1748,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[10] == 's') { if (function_name[11] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Model_App")) return &magento_profiled_functions[10]; @@ -1776,7 +1776,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[11] == 't') { if (function_name[12] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Model_App")) return &magento_profiled_functions[11]; @@ -1821,7 +1821,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[11] == 'e') { if (function_name[12] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Controller_Response_Http")) return &magento_profiled_functions[17]; @@ -1869,7 +1869,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[14] == 's') { if (function_name[15] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Model_Resource_Setup")) return &magento_profiled_functions[7]; @@ -1903,7 +1903,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[18] == 's') { if (function_name[19] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Model_Resource_Setup")) return &magento_profiled_functions[12]; @@ -1957,7 +1957,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[6] == 'e') { if (function_name[7] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "PDOStatement")) return &magento_profiled_functions[24]; @@ -1985,7 +1985,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[4] == 'h') { if (function_name[5] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Model_Cache")) return &magento_profiled_functions[19]; @@ -2006,7 +2006,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[16] == 'n') { if (function_name[17] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Adminhtml_CacheController")) return &magento_profiled_functions[20]; @@ -2059,7 +2059,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[9] == 'l') { if (function_name[10] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Index_Model_Process")) return &magento_profiled_functions[22]; @@ -2094,7 +2094,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[11] == 't') { if (function_name[12] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Controller_Varien_Action")) return &magento_profiled_functions[15]; @@ -2127,7 +2127,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[2] == 'n') { if (function_name[3] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Model_App")) return &magento_profiled_functions[1]; @@ -2156,7 +2156,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[13] == 't') { if (function_name[14] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Model_Cache")) return &magento_profiled_functions[4]; @@ -2184,7 +2184,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[11] == 't') { if (function_name[12] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Index_Model_Indexer_Abstract")) return &magento_profiled_functions[23]; @@ -2222,7 +2222,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[10] == 'h') { if (function_name[11] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Controller_Varien_Action")) return &magento_profiled_functions[13]; @@ -2262,7 +2262,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[11] == 'h') { if (function_name[12] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Controller_Varien_Action")) return &magento_profiled_functions[16]; @@ -2301,7 +2301,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[5] == 'l') { if (function_name[6] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Block_Abstract")) return &magento_profiled_functions[18]; @@ -2338,7 +2338,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[15] == 'e') { if (function_name[16] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Model_Config")) return &magento_profiled_functions[5]; @@ -2357,7 +2357,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec } if (function_name[11] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Model_Config")) return &magento_profiled_functions[6]; @@ -2382,7 +2382,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[5] == 'b') { if (function_name[6] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Model_Config")) return &magento_profiled_functions[8]; @@ -2403,7 +2403,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[11] == 't') { if (function_name[12] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Model_App")) return &magento_profiled_functions[9]; @@ -2441,7 +2441,7 @@ profiled_function_t *magento_match_function(const char* function_name, zend_exec if (function_name[16] == 's') { if (function_name[17] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Controller_Varien_Action")) return &magento_profiled_functions[14]; @@ -2502,7 +2502,7 @@ magento_send_metrics }; profiled_application_t *qm_match_first_app_function(const char* function_name, -zend_execute_data* data TSRMLS_DC) { +zend_execute_data* data) { ++hp_globals.internal_match_counters.total; if (function_name[0] == 'b') { if (function_name[1] == 'o') { @@ -2510,7 +2510,7 @@ zend_execute_data* data TSRMLS_DC) { if (function_name[3] == 't') { if (function_name[4] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Oro\\Bundle\\DistributionBundle\\OroKernel")) return &orocommerce_profiled_application; @@ -2533,7 +2533,7 @@ zend_execute_data* data TSRMLS_DC) { if (function_name[5] == 'e') { if (function_name[6] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Magento\\Framework\\App\\Bootstrap")) return &magento2_profiled_application; @@ -2565,7 +2565,7 @@ zend_execute_data* data TSRMLS_DC) { if (function_name[10] == 't') { if (function_name[11] == '\0') { ++hp_globals.internal_match_counters.function; - const char *class_name = hp_get_class_name(data TSRMLS_CC); + const char *class_name = hp_get_class_name(data); if (!class_name) return NULL; if (!strcmp(class_name, "Mage_Core_Model_App")) return &magento_profiled_application; diff --git a/extension/src/magento1/blocks.c b/extension/src/magento1/blocks.c index c259ecd..4210dbd 100644 --- a/extension/src/magento1/blocks.c +++ b/extension/src/magento1/blocks.c @@ -1,21 +1,21 @@ #include "quanta_mon.h" int magento1_block_before_render(profiled_application_t *app, profiled_function_t *function, -zend_execute_data *execute_data TSRMLS_DC) { +zend_execute_data *execute_data) { zval *this; magento_block_t *block = NULL; magento_context_t *context = (magento_context_t *)app->context; - if (!(this = get_this(execute_data TSRMLS_CC)) + if (!(this = get_this(execute_data)) || !(block = ecalloc(1, sizeof(*block)))) return -1; block->name = magento_get_block_attr("\0*\0_nameInLayout", - sizeof("\0*\0_nameInLayout") - 1, this TSRMLS_CC); - block->class = magento_get_block_class_name(this TSRMLS_CC); + sizeof("\0*\0_nameInLayout") - 1, this); + block->class = magento_get_block_class_name(this); if (block->class) - block->class_file = magento_get_block_class_file(this TSRMLS_CC); + block->class_file = magento_get_block_class_file(this); block->template = magento_get_block_attr("\0*\0_template", - sizeof("\0*\0_template") - 1, this TSRMLS_CC); + sizeof("\0*\0_template") - 1, this); if (!block->name) { PRINTF_QUANTA("Block does not have a nameInLayout (template: %s / class: %s)\n", block->template, block->class); diff --git a/extension/src/magento1/events.c b/extension/src/magento1/events.c index ab597c8..98685fc 100644 --- a/extension/src/magento1/events.c +++ b/extension/src/magento1/events.c @@ -1,12 +1,12 @@ #include "quanta_mon.h" int magento1_record_reindex_event(profiled_application_t *app, profiled_function_t *function, -zend_execute_data *execute_data TSRMLS_DC) { +zend_execute_data *execute_data) { zval *this; char *entity; - if (!(this = get_this(execute_data TSRMLS_CC)) - || !(entity = get_mage_model_data(Z_OBJPROP_P(this), "indexer_code" TSRMLS_CC)) + if (!(this = get_this(execute_data)) + || !(entity = get_mage_model_data(Z_OBJPROP_P(this), "indexer_code")) || qm_record_event(APP_EV_REINDEX, "reindex", entity)) { PRINTF_QUANTA("Cannot record reindex event\n"); return -1; @@ -15,14 +15,14 @@ zend_execute_data *execute_data TSRMLS_DC) { } int magento1_record_process_index_event(profiled_application_t *app, profiled_function_t *function, -zend_execute_data *execute_data TSRMLS_DC) { +zend_execute_data *execute_data) { zval *event; char *type; char *entity; if (!(event = safe_get_argument(execute_data, 1, IS_OBJECT)) - || !(type = get_mage_model_data(Z_OBJPROP_P(event), "entity" TSRMLS_CC)) - || !(entity = get_mage_model_data(Z_OBJPROP_P(event), "type" TSRMLS_CC)) + || !(type = get_mage_model_data(Z_OBJPROP_P(event), "entity")) + || !(entity = get_mage_model_data(Z_OBJPROP_P(event), "type")) || qm_record_event(APP_EV_REINDEX, type, entity)) { PRINTF_QUANTA("Cannot record process index event\n"); return -1; @@ -31,7 +31,7 @@ zend_execute_data *execute_data TSRMLS_DC) { } int magento1_record_cache_clean_event(profiled_application_t *app, profiled_function_t *function, -zend_execute_data *execute_data TSRMLS_DC) { +zend_execute_data *execute_data) { zval *subtype; (void)app; diff --git a/extension/src/magento1/version.c b/extension/src/magento1/version.c index 080358d..334941b 100644 --- a/extension/src/magento1/version.c +++ b/extension/src/magento1/version.c @@ -1,7 +1,7 @@ #include "quanta_mon.h" int magento1_fetch_version(profiled_application_t *app, profiled_function_t *function, -zend_execute_data *data TSRMLS_DC) { +zend_execute_data *data) { zval version; zval edition; magento_context_t *context = (magento_context_t *)app->context; @@ -10,8 +10,8 @@ zend_execute_data *data TSRMLS_DC) { (void)data; ZVAL_NULL(&version); ZVAL_NULL(&edition); - if (safe_call_function("Mage::getVersion", &version, IS_STRING, 0, NULL TSRMLS_CC) - || safe_call_function("Mage::getEdition", &edition, IS_STRING, 0, NULL TSRMLS_CC)) { + if (safe_call_function("Mage::getVersion", &version, IS_STRING, 0, NULL) + || safe_call_function("Mage::getEdition", &edition, IS_STRING, 0, NULL)) { PRINTF_QUANTA("Could not get magento version\n"); goto end; } diff --git a/extension/src/magento2/blocks.c b/extension/src/magento2/blocks.c index e81f934..5128080 100644 --- a/extension/src/magento2/blocks.c +++ b/extension/src/magento2/blocks.c @@ -1,6 +1,6 @@ #include "quanta_mon.h" -static zval *get_block_name(zend_execute_data *execute_data TSRMLS_DC) { +static zval *get_block_name(zend_execute_data *execute_data) { zval *ret; if (!execute_data || !execute_data->prev_execute_data @@ -11,7 +11,7 @@ static zval *get_block_name(zend_execute_data *execute_data TSRMLS_DC) { return ret; } -static zval *get_block_object(zval *this, zval *block_name TSRMLS_DC) { +static zval *get_block_object(zval *this, zval *block_name) { zval *blocks = NULL; zval *block = NULL; @@ -39,7 +39,7 @@ static zval *get_block_object(zval *this, zval *block_name TSRMLS_DC) { } int magento2_block_before_render(profiled_application_t *app, profiled_function_t *function, -zend_execute_data *execute_data TSRMLS_DC) { +zend_execute_data *execute_data) { zval *this; zval *block_name; zval *zblock; @@ -47,20 +47,20 @@ zend_execute_data *execute_data TSRMLS_DC) { magento_context_t *context = (magento_context_t *)app->context; (void)function; - if (!(this = get_prev_this(execute_data TSRMLS_CC)) - || !(block_name = get_block_name(execute_data TSRMLS_CC)) - || !(zblock = get_block_object(this, block_name TSRMLS_CC)) + if (!(this = get_prev_this(execute_data)) + || !(block_name = get_block_name(execute_data)) + || !(zblock = get_block_object(this, block_name)) || !(block = ecalloc(1, sizeof(magento_block_t))) || !(block->name = estrdup(Z_STRVAL_P(block_name)))) { PRINTF_QUANTA("Cannot get block info\n"); efree(block); return -1; } - block->class = magento_get_block_class_name(zblock TSRMLS_CC); + block->class = magento_get_block_class_name(zblock); if (block->class) - block->class_file = magento_get_block_class_file(zblock TSRMLS_CC); + block->class_file = magento_get_block_class_file(zblock); block->template = magento_get_block_attr("\0*\0_template", - sizeof("\0*\0_template") - 1, zblock TSRMLS_CC); + sizeof("\0*\0_template") - 1, zblock); block_stack_push(context, block); if (context->blocks.first == NULL) context->blocks.first = block; diff --git a/extension/src/magento2/events.c b/extension/src/magento2/events.c index 69a4cca..b3212d5 100644 --- a/extension/src/magento2/events.c +++ b/extension/src/magento2/events.c @@ -1,15 +1,15 @@ #include "quanta_mon.h" int magento2_record_reindex_event(profiled_application_t *app, profiled_function_t *function, -zend_execute_data *execute_data TSRMLS_DC) { +zend_execute_data *execute_data) { zval *this; zval *title; zval *title_text; (void)app; (void)function; - if (!(this = get_this(execute_data TSRMLS_CC)) - || !(title = get_mage_model_zdata(Z_OBJPROP_P(this), "title", IS_OBJECT TSRMLS_CC)) + if (!(this = get_this(execute_data)) + || !(title = get_mage_model_zdata(Z_OBJPROP_P(this), "title", IS_OBJECT)) || !(title_text = zend_read_property_compat(Z_OBJCE_P(title), title, "text"))) { PRINTF_QUANTA("Cannot get reindex type\n"); return -1; @@ -22,7 +22,7 @@ zend_execute_data *execute_data TSRMLS_DC) { } int magento2_record_cache_clean_event(profiled_application_t *app, profiled_function_t *function, -zend_execute_data *execute_data TSRMLS_DC) { +zend_execute_data *execute_data) { zval *subtype; (void)app; diff --git a/extension/src/magento2/version.c b/extension/src/magento2/version.c index d18b89b..20f7d71 100644 --- a/extension/src/magento2/version.c +++ b/extension/src/magento2/version.c @@ -1,6 +1,6 @@ #include "quanta_mon.h" -static char *get_magento2_composer_version(FILE *composer_file_handle TSRMLS_DC) { +static char *get_magento2_composer_version(FILE *composer_file_handle) { char *line = NULL; char *ptr = NULL; char *end; @@ -24,7 +24,7 @@ static char *get_magento2_composer_version(FILE *composer_file_handle TSRMLS_DC) } int magento2_fetch_version(profiled_application_t *app, profiled_function_t *function, -zend_execute_data *ex TSRMLS_DC) { +zend_execute_data *ex) { int ret; zval edition; char composer_path[1024]; @@ -51,10 +51,10 @@ zend_execute_data *ex TSRMLS_DC) { ** from the object Manager */ ret = safe_get_class_constant("Magento\\Enterprise\\Model\\ProductMetadata", - "EDITION_NAME", &edition, IS_STRING TSRMLS_CC); + "EDITION_NAME", &edition, IS_STRING); if (ret) { ret = safe_get_class_constant("Magento\\Framework\\App\\ProductMetadata", - "EDITION_NAME", &edition, IS_STRING TSRMLS_CC); + "EDITION_NAME", &edition, IS_STRING); } if (!ret) context->edition = estrdup(Z_STRVAL(edition)); diff --git a/extension/src/magento_common/blocks.c b/extension/src/magento_common/blocks.c index 59a02f1..dab590c 100644 --- a/extension/src/magento_common/blocks.c +++ b/extension/src/magento_common/blocks.c @@ -1,9 +1,9 @@ #include "quanta_mon.h" -char *magento_get_block_class_name(zval *block TSRMLS_DC) { +char *magento_get_block_class_name(zval *block) { const char *class_name; - if (!(class_name = get_obj_class_name(block TSRMLS_CC))) + if (!(class_name = get_obj_class_name(block))) return NULL; return estrdup(class_name); } @@ -20,11 +20,11 @@ char *magento_get_block_class_file(zval *block) { #if PHP_MAJOR_VERSION < 7 return estrdup(ce->info.user.filename); #else - return ZSTR_VAL(ce->info.user.filename) ? estrdup(ZSTR_VAL(ce->info.user.filename)) : NULL; + return estrdup(ZSTR_VAL(ce->info.user.filename)); #endif } -char *magento_get_block_attr(const char *key, size_t key_len, zval *this TSRMLS_DC) { +char *magento_get_block_attr(const char *key, size_t key_len, zval *this) { zval *data; HashTable *block; @@ -45,7 +45,7 @@ char *magento_get_block_attr(const char *key, size_t key_len, zval *this TSRMLS_ } int magento_block_after_render(profiled_application_t *app, profiled_function_t *function, -zend_execute_data *execute_data TSRMLS_DC) { +zend_execute_data *execute_data) { magento_block_t *block; magento_block_t *parent; magento_context_t *context = (magento_context_t *)app->context; diff --git a/extension/src/magento_common/context.c b/extension/src/magento_common/context.c index 532efe7..7df59af 100644 --- a/extension/src/magento_common/context.c +++ b/extension/src/magento_common/context.c @@ -6,7 +6,7 @@ static magento_context_t magento_context = { NULL }; -void *magento_init_context(profiled_application_t *app TSRMLS_DC) { +void *magento_init_context(profiled_application_t *app) { magento_context.blocks.first = NULL; magento_context.blocks.last = NULL; magento_context.block_stack = NULL; @@ -15,11 +15,11 @@ void *magento_init_context(profiled_application_t *app TSRMLS_DC) { return (void *)&magento_context; } -void magento_cleanup_context(profiled_application_t *app TSRMLS_DC) { +void magento_cleanup_context(profiled_application_t *app) { magento_context_t *context = (magento_context_t *)app->context; efree(context->version); efree(context->edition); while (block_stack_pop(context)); - magento_init_context(app TSRMLS_CC); + magento_init_context(app); } diff --git a/extension/src/magento_common/events.c b/extension/src/magento_common/events.c index acf449b..f350b85 100644 --- a/extension/src/magento_common/events.c +++ b/extension/src/magento_common/events.c @@ -1,7 +1,7 @@ #include "quanta_mon.h" int magento_record_cache_flush_event(profiled_application_t *app, profiled_function_t *function, -zend_execute_data *execute_data TSRMLS_DC) { +zend_execute_data *execute_data) { (void)app; (void)function; (void)execute_data; @@ -12,7 +12,7 @@ zend_execute_data *execute_data TSRMLS_DC) { } int magento_record_cache_system_flush_event(profiled_application_t *app, -profiled_function_t *function, zend_execute_data *execute_data TSRMLS_DC) { +profiled_function_t *function, zend_execute_data *execute_data) { (void)app; (void)function; (void)execute_data; diff --git a/extension/src/magento_common/metrics.c b/extension/src/magento_common/metrics.c index e84f5c3..915fe86 100644 --- a/extension/src/magento_common/metrics.c +++ b/extension/src/magento_common/metrics.c @@ -77,7 +77,7 @@ monikor_metric_list_t *metrics, float cpufreq, magento_block_t *block) { } static void push_blocks_metrics(profiled_application_t *app, struct timeval *clock, -monikor_metric_list_t *metrics, float cpufreq TSRMLS_DC) { +monikor_metric_list_t *metrics, float cpufreq) { magento_context_t *context = (magento_context_t *)app->context; magento_block_t *current_block; magento_block_t *next_block; @@ -117,7 +117,7 @@ monikor_metric_list_t *metrics) { } void magento_send_metrics(profiled_application_t *app, monikor_metric_list_t *metrics, -float cpufreq, struct timeval *clock TSRMLS_DC) { +float cpufreq, struct timeval *clock) { if (hp_globals.profiler_level != QUANTA_MON_MODE_APP_PROFILING) return; push_blocks_metrics(app, clock, metrics, cpufreq); diff --git a/extension/src/magento_common/model_data.c b/extension/src/magento_common/model_data.c index 95bccec..0144965 100644 --- a/extension/src/magento_common/model_data.c +++ b/extension/src/magento_common/model_data.c @@ -1,6 +1,6 @@ #include "quanta_mon.h" -zval *get_mage_model_zdata(HashTable *attrs, char *key, int type TSRMLS_DC) { +zval *get_mage_model_zdata(HashTable *attrs, char *key, int type) { zval *data; zval *ret; @@ -27,10 +27,10 @@ zval *get_mage_model_zdata(HashTable *attrs, char *key, int type TSRMLS_DC) { return ret; } -char *get_mage_model_data(HashTable *attrs, char *key TSRMLS_DC) { +char *get_mage_model_data(HashTable *attrs, char *key) { zval *data; - if (!(data = get_mage_model_zdata(attrs, key, IS_STRING TSRMLS_CC))) + if (!(data = get_mage_model_zdata(attrs, key, IS_STRING))) return NULL; return Z_STRVAL_P(data); } diff --git a/extension/src/magento_common/sql.c b/extension/src/magento_common/sql.c index 97aebb5..fe68396 100644 --- a/extension/src/magento_common/sql.c +++ b/extension/src/magento_common/sql.c @@ -1,10 +1,10 @@ #include "quanta_mon.h" int magento_record_sql_query(profiled_application_t *app, profiled_function_t *function, -zend_execute_data *data TSRMLS_DC) { +zend_execute_data *data) { magento_block_t *block; - if (qm_record_sql_query(app, function, data TSRMLS_CC)) + if (qm_record_sql_query(app, function, data)) return -1; if ((block = block_stack_top((magento_context_t *)app->context))) { block->sql_cpu_cycles += function->tsc.last_stop - function->tsc.last_start; diff --git a/extension/src/module/module_init.c b/extension/src/module/module_init.c index eebe07f..554248d 100644 --- a/extension/src/module/module_init.c +++ b/extension/src/module/module_init.c @@ -18,7 +18,7 @@ PHP_MINIT_FUNCTION(quanta_mon) { if (!hp_globals.admin_url || !*hp_globals.admin_url) hp_globals.admin_url = QUANTA_MON_DEFAULT_ADMIN_URL; if ((!hp_globals.path_quanta_agent_socket) || (strlen(hp_globals.path_quanta_agent_socket) < 4)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, + php_error_docref(NULL, E_WARNING, "quanta_mon.path_quanta_agent_socket configuration missing or invalid. Module disabled."); return FAILURE; } diff --git a/extension/src/module/request_init.c b/extension/src/module/request_init.c index 003bab0..ac13f0f 100644 --- a/extension/src/module/request_init.c +++ b/extension/src/module/request_init.c @@ -1,6 +1,6 @@ #include "quanta_mon.h" -static char *extract_request_uri(HashTable *_SERVER TSRMLS_DC) { +static char *extract_request_uri(HashTable *_SERVER) { zval *request_uri; request_uri = zend_hash_find_compat(_SERVER, "REQUEST_URI", sizeof("REQUEST_URI") - 1); @@ -12,7 +12,7 @@ static char *extract_request_uri(HashTable *_SERVER TSRMLS_DC) { return estrdup(Z_STRVAL_P(request_uri)); } -static int extract_step_clock_and_mode(HashTable *_SERVER TSRMLS_DC) { +static int extract_step_clock_and_mode(HashTable *_SERVER) { zval *data; char *quanta_header; char *quanta_mode; @@ -46,7 +46,7 @@ static int extract_step_clock_and_mode(HashTable *_SERVER TSRMLS_DC) { } -static void arm_server_auto_global(TSRMLS_D) { +static void arm_server_auto_global() { zend_auto_global* auto_global; #if PHP_MAJOR_VERSION >= 7 zval *auto_global_zval; @@ -58,7 +58,7 @@ static void arm_server_auto_global(TSRMLS_D) { if (zend_hash_find(CG(auto_globals), "_SERVER", sizeof("_SERVER"), (void **)&auto_global) == FAILURE) return; auto_global->armed = auto_global->auto_global_callback(auto_global->name, - auto_global->name_len TSRMLS_CC); + auto_global->name_len); #else auto_global_zval = zend_hash_find_compat(CG(auto_globals), "_SERVER", sizeof("_SERVER") - 1); if (!auto_global_zval) { @@ -76,21 +76,21 @@ static void arm_server_auto_global(TSRMLS_D) { ** ** @returns: the profiled mode */ -static int extract_headers_info(TSRMLS_D) { +static int extract_headers_info(void) { HashTable *_SERVER; zval *zserver; int mode; hp_globals.quanta_clock = 0; - arm_server_auto_global(TSRMLS_C); + arm_server_auto_global(); zserver = zend_hash_find_compat(&EG(symbol_table), "_SERVER", sizeof("_SERVER") - 1); if (!zserver || Z_TYPE_P(zserver) != IS_ARRAY) { PRINTF_QUANTA("NO _SERVER\n"); return -1; } _SERVER = Z_ARRVAL_P(zserver); - hp_globals.request_uri = extract_request_uri(_SERVER TSRMLS_CC); - mode = extract_step_clock_and_mode(_SERVER TSRMLS_CC); + hp_globals.request_uri = extract_request_uri(_SERVER); + mode = extract_step_clock_and_mode(_SERVER); if (mode == -1) { if (!hp_globals.request_uri || strstr(hp_globals.request_uri, hp_globals.admin_url)) { PRINTF_QUANTA("ENABLING EVENTS %s %s\n", hp_globals.request_uri, hp_globals.admin_url); @@ -114,14 +114,14 @@ PHP_RINIT_FUNCTION(quanta_mon) { uint64_t end; start = cycle_timer(); - mode = extract_headers_info(TSRMLS_C); + mode = extract_headers_info(); if (mode == -1) { PRINTF_QUANTA("PROFILER NOT ENABLED\n"); return SUCCESS; } PRINTF_QUANTA("PROFILER ENABLED WITH MODE %d\n", mode); hp_globals.global_tsc.start = start; - hp_begin(mode TSRMLS_CC); + hp_begin(mode); end = cycle_timer(); hp_globals.internal_match_counters.init_cycles += end - start; return SUCCESS; diff --git a/extension/src/module/request_shutdown.c b/extension/src/module/request_shutdown.c index f007fda..68d080b 100644 --- a/extension/src/module/request_shutdown.c +++ b/extension/src/module/request_shutdown.c @@ -6,6 +6,6 @@ PHP_RSHUTDOWN_FUNCTION(quanta_mon) { hp_globals.global_tsc.stop = cycle_timer(); hp_globals.internal_match_counters.shutdown_cycles = hp_globals.global_tsc.stop; - hp_end(TSRMLS_C); + hp_end(); return SUCCESS; } diff --git a/extension/src/oro/blocks.c b/extension/src/oro/blocks.c index c063ebb..57ac9c1 100644 --- a/extension/src/oro/blocks.c +++ b/extension/src/oro/blocks.c @@ -1,6 +1,6 @@ #include "quanta_mon.h" -static zval *get_block_var(zval *block, const char * key, int type TSRMLS_DC) { +static zval *get_block_var(zval *block, const char * key, int type) { zval *data; zval *ret; @@ -30,7 +30,7 @@ static zval *get_block_var(zval *block, const char * key, int type TSRMLS_DC) { } int oro_before_render_block(profiled_application_t *app, profiled_function_t *function, -zend_execute_data *execute_data TSRMLS_DC) { +zend_execute_data *execute_data) { oro_context_t *context = (oro_context_t *)app->context; oro_block_t *current_block; oro_block_t *block; @@ -46,7 +46,7 @@ zend_execute_data *execute_data TSRMLS_DC) { PRINTF_QUANTA("Cannot parse arguments\n"); return -1; } - if (!(id = get_block_var(zblock, "id", IS_STRING TSRMLS_CC))) { + if (!(id = get_block_var(zblock, "id", IS_STRING))) { PRINTF_QUANTA("Cannot get block id\n"); return -1; } @@ -58,8 +58,8 @@ zend_execute_data *execute_data TSRMLS_DC) { if (!(block = ecalloc(1, sizeof(*block))) || !(block->name = estrdup(Z_STRVAL_P(id)))) return -1; - if (!safe_call_function("current", &twig, IS_OBJECT, 1, resource TSRMLS_CC) - && !safe_call_method(&twig, "getTemplateName", &template, IS_STRING, 0, NULL TSRMLS_CC)) { + if (!safe_call_function("current", &twig, IS_OBJECT, 1, resource) + && !safe_call_method(&twig, "getTemplateName", &template, IS_STRING, 0, NULL)) { block->template = estrdup(Z_STRVAL(template)); } else { PRINTF_QUANTA("Cannot get template\n"); @@ -76,7 +76,7 @@ zend_execute_data *execute_data TSRMLS_DC) { } int oro_after_render_block(profiled_application_t *app, profiled_function_t *function, -zend_execute_data *execute_data TSRMLS_DC) { +zend_execute_data *execute_data) { oro_context_t *context = (oro_context_t *)app->context; oro_block_t *block; oro_block_t *parent; diff --git a/extension/src/oro/context.c b/extension/src/oro/context.c index 3a0a574..e83e348 100644 --- a/extension/src/oro/context.c +++ b/extension/src/oro/context.c @@ -6,7 +6,7 @@ static oro_context_t oro_context = { NULL }; -void *oro_init_context(profiled_application_t *app TSRMLS_DC) { +void *oro_init_context(profiled_application_t *app) { oro_context.version = NULL; oro_context.blocks.first = NULL; oro_context.blocks.last = NULL; @@ -14,10 +14,10 @@ void *oro_init_context(profiled_application_t *app TSRMLS_DC) { return (void *)&oro_context; } -void oro_cleanup_context(profiled_application_t *app TSRMLS_DC) { +void oro_cleanup_context(profiled_application_t *app) { oro_context_t *context = (oro_context_t *)app->context; efree(context->version); while (oro_block_stack_pop(context)); - oro_init_context(app TSRMLS_CC); + oro_init_context(app); } diff --git a/extension/src/oro/metrics.c b/extension/src/oro/metrics.c index cc43f30..bc8eb65 100644 --- a/extension/src/oro/metrics.c +++ b/extension/src/oro/metrics.c @@ -54,7 +54,7 @@ monikor_metric_list_t *metrics, float cpufreq, oro_block_t *block) { } static void push_blocks_metrics(profiled_application_t *app, struct timeval *clock, -monikor_metric_list_t *metrics, float cpufreq TSRMLS_DC) { +monikor_metric_list_t *metrics, float cpufreq) { oro_context_t *context = (oro_context_t *)app->context; oro_block_t *current_block; oro_block_t *next_block; @@ -82,7 +82,7 @@ monikor_metric_list_t *metrics) { } void oro_send_metrics(profiled_application_t *app, monikor_metric_list_t *metrics, -float cpufreq, struct timeval *clock TSRMLS_DC) { +float cpufreq, struct timeval *clock) { if (hp_globals.profiler_level != QUANTA_MON_MODE_APP_PROFILING) return; push_blocks_metrics(app, clock, metrics, cpufreq); diff --git a/extension/src/oro/sql.c b/extension/src/oro/sql.c index 245b9fc..f9a07ac 100644 --- a/extension/src/oro/sql.c +++ b/extension/src/oro/sql.c @@ -1,10 +1,10 @@ #include "quanta_mon.h" int oro_record_sql_query(profiled_application_t *app, profiled_function_t *function, -zend_execute_data *data TSRMLS_DC) { +zend_execute_data *data) { oro_block_t *block; - if (qm_record_sql_query(app, function, data TSRMLS_CC)) + if (qm_record_sql_query(app, function, data)) return -1; if ((block = oro_block_stack_top((oro_context_t *)app->context))) { block->sql_cpu_cycles += function->tsc.last_stop - function->tsc.last_start; diff --git a/extension/src/oro/version.c b/extension/src/oro/version.c index ee5594a..77b28b4 100644 --- a/extension/src/oro/version.c +++ b/extension/src/oro/version.c @@ -30,14 +30,14 @@ static char *get_oro_version_from_composer_installed(FILE *composer_file) { static const char *installed_file = "vendor/composer/installed.json"; -static char *get_oro_vendor_file(zend_execute_data *execute_data TSRMLS_DC) { +static char *get_oro_vendor_file(zend_execute_data *execute_data) { zval *this; zend_class_entry *ce; char *this_filename; char *filename; char *end; - if (!(this = get_prev_this(execute_data TSRMLS_CC)) + if (!(this = get_prev_this(execute_data)) || !(ce = Z_OBJCE_P(this)) || ce->type != ZEND_USER_CLASS || !ce->info.user.filename) { @@ -60,13 +60,13 @@ static char *get_oro_vendor_file(zend_execute_data *execute_data TSRMLS_DC) { } int oro_fetch_version(profiled_application_t *app, profiled_function_t *function, -zend_execute_data *execute_data TSRMLS_DC) { +zend_execute_data *execute_data) { oro_context_t *context = (oro_context_t *)app->context; char *filepath = NULL; FILE *composer_file_handle = NULL; (void)function; - filepath = get_oro_vendor_file(execute_data TSRMLS_CC); + filepath = get_oro_vendor_file(execute_data); if (!filepath) return 0; if (!(composer_file_handle = fopen(filepath, "r"))) { diff --git a/extension/src/profiler/app_profiler.c b/extension/src/profiler/app_profiler.c index edb7833..0970594 100644 --- a/extension/src/profiler/app_profiler.c +++ b/extension/src/profiler/app_profiler.c @@ -1,19 +1,19 @@ #include "quanta_mon.h" -int qm_begin_profiling(const char *curr_func, zend_execute_data *execute_data TSRMLS_DC) { +int qm_begin_profiling(const char *curr_func, zend_execute_data *execute_data) { profiled_function_t *function; uint64_t match_start; uint64_t match_end; if (!hp_globals.profiled_application) { - hp_globals.profiled_application = qm_match_first_app_function(curr_func, execute_data TSRMLS_CC); + hp_globals.profiled_application = qm_match_first_app_function(curr_func, execute_data); if (!hp_globals.profiled_application) return -1; PRINTF_QUANTA("APPLICATION FOUND: %s\n", hp_globals.profiled_application->name); init_profiled_application(hp_globals.profiled_application); } match_start = cycle_timer(); - function = hp_globals.profiled_application->match_function(curr_func, execute_data TSRMLS_CC); + function = hp_globals.profiled_application->match_function(curr_func, execute_data); match_end = cycle_timer(); hp_globals.internal_match_counters.cycles += match_end - match_start; if (!function || function->options.min_profiling_level < hp_globals.profiler_level) @@ -22,13 +22,13 @@ int qm_begin_profiling(const char *curr_func, zend_execute_data *execute_data TS if (!function->tsc.first_start) function->tsc.first_start = function->tsc.last_start; if (function->begin_callback - && function->begin_callback(hp_globals.profiled_application, function, execute_data TSRMLS_CC)) { + && function->begin_callback(hp_globals.profiled_application, function, execute_data)) { return -1; } return function->index; } -int qm_end_profiling(int function_idx, zend_execute_data *execute_data TSRMLS_DC) { +int qm_end_profiling(int function_idx, zend_execute_data *execute_data) { profiled_application_t *app = hp_globals.profiled_application; profiled_function_t *function; @@ -39,7 +39,7 @@ int qm_end_profiling(int function_idx, zend_execute_data *execute_data TSRMLS_DC if (!function->tsc.first_stop) function->tsc.first_stop = function->tsc.last_stop; if (function->end_callback - && function->end_callback(hp_globals.profiled_application, function, execute_data TSRMLS_CC)) { + && function->end_callback(hp_globals.profiled_application, function, execute_data)) { function_idx = -1; } return function_idx; diff --git a/extension/src/profiler/application.c b/extension/src/profiler/application.c index 43d862c..a90a130 100644 --- a/extension/src/profiler/application.c +++ b/extension/src/profiler/application.c @@ -8,17 +8,17 @@ static void init_profiled_application_counters(profiled_application_t *app) { } } -void init_profiled_application(profiled_application_t *app TSRMLS_DC) { +void init_profiled_application(profiled_application_t *app) { app->sql_queries.first = NULL; app->sql_queries.last = NULL; init_profiled_application_counters(app); if (app->create_context) - app->context = app->create_context(app TSRMLS_CC); + app->context = app->create_context(app); else app->context = NULL; } -void clean_profiled_application(profiled_application_t *app TSRMLS_DC) { +void clean_profiled_application(profiled_application_t *app) { sql_query_record_t *query; sql_query_record_t *next_query; size_t sql_count; @@ -35,5 +35,5 @@ void clean_profiled_application(profiled_application_t *app TSRMLS_DC) { } PRINTF_QUANTA("TOTAL SQL QUERIES: %zu\n", sql_count); if (app->cleanup_context) - app->cleanup_context(app TSRMLS_CC); + app->cleanup_context(app); } diff --git a/extension/src/profiler/begin_profiling.c b/extension/src/profiler/begin_profiling.c index c4cbea6..7f8849f 100644 --- a/extension/src/profiler/begin_profiling.c +++ b/extension/src/profiler/begin_profiling.c @@ -1,9 +1,9 @@ #include "quanta_mon.h" -int hp_begin_profiling(hp_entry_t **entries, const char *symbol, zend_execute_data *data TSRMLS_DC) { +int hp_begin_profiling(hp_entry_t **entries, const char *symbol, zend_execute_data *data) { int profile_curr; - profile_curr = qm_begin_profiling(symbol, data TSRMLS_CC); + profile_curr = qm_begin_profiling(symbol, data); if (hp_globals.profiler_level == QUANTA_MON_MODE_HIERARCHICAL) { hp_entry_t *cur_entry = hp_fast_alloc_hprof_entry(); if (!cur_entry) @@ -11,7 +11,7 @@ int hp_begin_profiling(hp_entry_t **entries, const char *symbol, zend_execute_da cur_entry->hash_code = hp_inline_hash(symbol); cur_entry->name_hprof = symbol; cur_entry->prev_hprof = *entries; - hp_hier_begin_profiling(entries, cur_entry TSRMLS_CC); + hp_hier_begin_profiling(entries, cur_entry); /* Update entries linked list */ *entries = cur_entry; } diff --git a/extension/src/profiler/end_profiling.c b/extension/src/profiler/end_profiling.c index 167f0e4..2d3cf87 100644 --- a/extension/src/profiler/end_profiling.c +++ b/extension/src/profiler/end_profiling.c @@ -1,8 +1,8 @@ #include "quanta_mon.h" -void hp_end_profiling(hp_entry_t **entries, int profile_curr, zend_execute_data *data TSRMLS_DC) { +void hp_end_profiling(hp_entry_t **entries, int profile_curr, zend_execute_data *data) { if (profile_curr >= 0) { - qm_end_profiling(profile_curr, data TSRMLS_CC); + qm_end_profiling(profile_curr, data); } if (hp_globals.profiler_level == QUANTA_MON_MODE_HIERARCHICAL && entries && *entries) { hp_entry_t *cur_entry; @@ -10,7 +10,7 @@ void hp_end_profiling(hp_entry_t **entries, int profile_curr, zend_execute_data /* NOTE(cjiang): we want to call this 'end_fn_cb' before */ /* 'hp_mode_common_endfn' to avoid including the time in */ /* 'hp_mode_common_endfn' in the profiling results. */ - hp_hier_end_profiling(entries TSRMLS_CC); + hp_hier_end_profiling(entries); cur_entry = *entries; /* Free top entry and update entries linked list */ *entries = (*entries)->prev_hprof; diff --git a/extension/src/profiler/events_metrics.c b/extension/src/profiler/events_metrics.c index a623a97..c24a9b6 100644 --- a/extension/src/profiler/events_metrics.c +++ b/extension/src/profiler/events_metrics.c @@ -9,7 +9,7 @@ static inline const char *event_class_str(applicative_event_t *event) { return "unknown"; } -void qm_send_events_metrics(struct timeval *clock, monikor_metric_list_t *metrics TSRMLS_DC) { +void qm_send_events_metrics(struct timeval *clock, monikor_metric_list_t *metrics) { char metric_name[MAX_METRIC_NAME_LENGTH]; monikor_metric_t *metric; applicative_event_t *event; diff --git a/extension/src/profiler/hier_profiler.c b/extension/src/profiler/hier_profiler.c index ed7da17..60bd5c3 100644 --- a/extension/src/profiler/hier_profiler.c +++ b/extension/src/profiler/hier_profiler.c @@ -5,7 +5,7 @@ * * @author kannan */ -void hp_hier_begin_profiling(hp_entry_t **entries, hp_entry_t *current TSRMLS_DC) { +void hp_hier_begin_profiling(hp_entry_t **entries, hp_entry_t *current) { hp_entry_t *p; int recurse_level = 0; @@ -26,8 +26,8 @@ void hp_hier_begin_profiling(hp_entry_t **entries, hp_entry_t *current TSRMLS_D /* Get CPU & memory usage */ getrusage(RUSAGE_SELF, &(current->ru_start_hprof)); - current->mu_start_hprof = zend_memory_usage(0 TSRMLS_CC); - current->pmu_start_hprof = zend_memory_peak_usage(0 TSRMLS_CC); + current->mu_start_hprof = zend_memory_usage(0); + current->pmu_start_hprof = zend_memory_peak_usage(0); } /** @@ -35,7 +35,7 @@ void hp_hier_begin_profiling(hp_entry_t **entries, hp_entry_t *current TSRMLS_D * * @author kannan */ -void hp_hier_end_profiling(hp_entry_t **entries TSRMLS_DC) { +void hp_hier_end_profiling(hp_entry_t **entries) { hp_entry_t *top = (*entries); zval *counts; struct rusage ru_end; @@ -67,9 +67,9 @@ void hp_hier_end_profiling(hp_entry_t **entries TSRMLS_DC) { #endif } - hp_inc_count(counts, "ct", 1 TSRMLS_CC); + hp_inc_count(counts, "ct", 1 ); hp_inc_count(counts, "wt", get_us_from_tsc(tsc_end - top->tsc_start, - hp_globals.cpu_frequencies[hp_globals.cur_cpu_id]) TSRMLS_CC); + hp_globals.cpu_frequencies[hp_globals.cur_cpu_id])); /* Get CPU usage */ getrusage(RUSAGE_SELF, &ru_end); @@ -78,13 +78,13 @@ void hp_hier_end_profiling(hp_entry_t **entries TSRMLS_DC) { hp_inc_count(counts, "cpu", get_us_interval(&(top->ru_start_hprof.ru_utime), &(ru_end.ru_utime)) + get_us_interval(&(top->ru_start_hprof.ru_stime), &(ru_end.ru_stime)) - TSRMLS_CC); + ); /* Get Memory usage */ - mu_end = zend_memory_usage(0 TSRMLS_CC); - pmu_end = zend_memory_peak_usage(0 TSRMLS_CC); + mu_end = zend_memory_usage(0); + pmu_end = zend_memory_peak_usage(0); /* Bump Memory stats in the counts hashtable */ - hp_inc_count(counts, "mu", mu_end - top->mu_start_hprof TSRMLS_CC); - hp_inc_count(counts, "pmu", pmu_end - top->pmu_start_hprof TSRMLS_CC); + hp_inc_count(counts, "mu", mu_end - top->mu_start_hprof ); + hp_inc_count(counts, "pmu", pmu_end - top->pmu_start_hprof ); } diff --git a/extension/src/profiler/hp_begin.c b/extension/src/profiler/hp_begin.c index f76722f..848deeb 100644 --- a/extension/src/profiler/hp_begin.c +++ b/extension/src/profiler/hp_begin.c @@ -5,14 +5,14 @@ * It replaces all the functions like zend_execute, zend_execute_internal, * etc that needs to be instrumented with their corresponding proxies. */ -void hp_begin(long level TSRMLS_DC) { +void hp_begin(long level) { if (!hp_globals.enabled) { hp_globals.enabled = 1; hp_hijack_zend_execute(level); - hp_init_profiler_state(level TSRMLS_CC); + hp_init_profiler_state(level); /* start profiling from fictitious main() */ - hp_begin_profiling(&hp_globals.entries, ROOT_SYMBOL, NULL TSRMLS_CC); + hp_begin_profiling(&hp_globals.entries, ROOT_SYMBOL, NULL); } } diff --git a/extension/src/profiler/hp_end.c b/extension/src/profiler/hp_end.c index 7205ee3..1dc770b 100644 --- a/extension/src/profiler/hp_end.c +++ b/extension/src/profiler/hp_end.c @@ -42,11 +42,11 @@ static void print_selfprofiling_metrics(void) { /** * Called at request shutdown time. Cleans the profiler's global state. */ -void hp_end(TSRMLS_D) { +void hp_end(void) { /* Stop profiler if enabled */ if (hp_globals.enabled) { - hp_stop(TSRMLS_C); - hp_clean_profiler_state(TSRMLS_C); + hp_stop(); + hp_clean_profiler_state(); } } @@ -54,11 +54,11 @@ void hp_end(TSRMLS_D) { * Called from quanta_mon_disable(). Removes all the proxies setup by * hp_begin() and restores the original values. */ -void hp_stop(TSRMLS_D) { +void hp_stop(void) { /* End any unfinished calls */ while (hp_globals.entries) - hp_end_profiling(&hp_globals.entries, -1, NULL TSRMLS_CC); - send_metrics(TSRMLS_C); + hp_end_profiling(&hp_globals.entries, -1, NULL); + send_metrics(); print_selfprofiling_metrics(); hp_restore_original_zend_execute(); /* Resore cpu affinity. */ diff --git a/extension/src/profiler/profiler_clean.c b/extension/src/profiler/profiler_clean.c index 583387e..a994f20 100644 --- a/extension/src/profiler/profiler_clean.c +++ b/extension/src/profiler/profiler_clean.c @@ -5,7 +5,7 @@ * * @author kannan, veeve */ -void hp_clean_profiler_state(TSRMLS_D) { +void hp_clean_profiler_state(void) { ZVAL_NULL(&hp_globals.stats_count); hp_globals.entries = NULL; hp_globals.profiler_level = 1; diff --git a/extension/src/profiler/profiler_init.c b/extension/src/profiler/profiler_init.c index 657a739..2be53ec 100644 --- a/extension/src/profiler/profiler_init.c +++ b/extension/src/profiler/profiler_init.c @@ -5,7 +5,7 @@ * * @author kannan, veeve */ -void hp_init_profiler_state(int level TSRMLS_DC) { +void hp_init_profiler_state(int level) { /* Setup globals */ if (!hp_globals.ever_enabled) { hp_globals.ever_enabled = 1; diff --git a/extension/src/profiler/profiling_metrics.c b/extension/src/profiler/profiling_metrics.c index 149c389..ad368c2 100644 --- a/extension/src/profiler/profiling_metrics.c +++ b/extension/src/profiler/profiling_metrics.c @@ -132,7 +132,7 @@ struct timeval *clock, monikor_metric_list_t *metrics, float cpufreq) { } void qm_send_profiler_metrics(struct timeval *clock, monikor_metric_list_t *metrics, -float cpufreq TSRMLS_DC) { +float cpufreq) { profiled_application_t *app = hp_globals.profiled_application; char metric_name[MAX_METRIC_NAME_LENGTH]; char *metric_base_end; diff --git a/extension/src/profiler/record_sql_query.c b/extension/src/profiler/record_sql_query.c index 9cb1832..5f24429 100644 --- a/extension/src/profiler/record_sql_query.c +++ b/extension/src/profiler/record_sql_query.c @@ -1,22 +1,14 @@ #include "quanta_mon.h" int qm_record_sql_query(profiled_application_t *app, profiled_function_t *function, -zend_execute_data *data TSRMLS_DC) { +zend_execute_data *data) { sql_query_record_t *query; - // #if PHP_VERSION_ID >= 70000 - // pdo_stmt_t *stmt = (pdo_stmt_t*)((char*)Z_OBJ_P(&data->This) - Z_OBJ_HT_P(&data->This)->offset); - // #else - // pdo_stmt_t *stmt = (pdo_stmt_t*)zend_object_store_get_object_by_handle( - // Z_OBJ_HANDLE_P(data->object TSRMLS_CC); - // #endif (void)data; if (!(query = ecalloc(1, sizeof(*query)))) return 0; query->tsc_start = function->tsc.last_start; query->tsc_stop = function->tsc.last_stop; - // if (stmt && stmt->query_string) - // query->query = estrdup(stmt->query_string); if (!app->sql_queries.first) app->sql_queries.first = query; if (app->sql_queries.last) diff --git a/extension/src/profiler/selfprofiling_metrics.c b/extension/src/profiler/selfprofiling_metrics.c index 54fcbbd..4f2c6bc 100644 --- a/extension/src/profiler/selfprofiling_metrics.c +++ b/extension/src/profiler/selfprofiling_metrics.c @@ -1,7 +1,7 @@ #include "quanta_mon.h" void qm_send_selfprofiling_metrics(struct timeval *clock, monikor_metric_list_t *metrics, -float cpufreq TSRMLS_DC) { +float cpufreq) { profiled_application_t *app = hp_globals.profiled_application; char metric_name[MAX_METRIC_NAME_LENGTH]; char *metric_base_end; diff --git a/extension/src/profiler/send_metrics.c b/extension/src/profiler/send_metrics.c index 37f27a5..d12acbe 100644 --- a/extension/src/profiler/send_metrics.c +++ b/extension/src/profiler/send_metrics.c @@ -24,14 +24,14 @@ static void fetch_request_uri(struct timeval *clock, monikor_metric_list_t *metr monikor_metric_list_push(metrics, metric); } -static void fetch_xhprof_metrics(struct timeval *clock, monikor_metric_list_t *metrics TSRMLS_DC) { +static void fetch_xhprof_metrics(struct timeval *clock, monikor_metric_list_t *metrics) { char metric_name[MAX_METRIC_NAME_LENGTH]; zval encoded; if (hp_globals.profiler_level != QUANTA_MON_MODE_HIERARCHICAL) return; ZVAL_NULL(&encoded); - if (safe_call_function("json_encode", &encoded, IS_STRING, 1, &hp_globals.stats_count TSRMLS_CC)) { + if (safe_call_function("json_encode", &encoded, IS_STRING, 1, &hp_globals.stats_count)) { PRINTF_QUANTA("Error: cannot json encode xhprof output\n"); } else { sprintf(metric_name, "qtracer.%zu.json", hp_globals.quanta_step_id); @@ -131,7 +131,7 @@ static void send_data_to_monikor(monikor_metric_list_t *metrics) { close(sock); } -void send_metrics(TSRMLS_D) { +void send_metrics() { monikor_metric_list_t *metrics; struct timeval now; @@ -150,12 +150,12 @@ void send_metrics(TSRMLS_D) { float cpufreq = hp_globals.cpu_frequencies[hp_globals.cur_cpu_id]; fetch_request_uri(&now, metrics); - fetch_xhprof_metrics(&now, metrics TSRMLS_CC); - qm_send_profiler_metrics(&now, metrics, cpufreq TSRMLS_CC); - qm_send_selfprofiling_metrics(&now, metrics, cpufreq TSRMLS_CC); + fetch_xhprof_metrics(&now, metrics); + qm_send_profiler_metrics(&now, metrics, cpufreq); + qm_send_selfprofiling_metrics(&now, metrics, cpufreq); if (hp_globals.profiled_application && hp_globals.profiled_application->send_metrics) { hp_globals.profiled_application->send_metrics(hp_globals.profiled_application, metrics, - cpufreq, &now TSRMLS_CC); + cpufreq, &now); } } /* We only want to provide context information such as versions when we actually have some metrics diff --git a/extension/src/profiler/zend_execute.c b/extension/src/profiler/zend_execute.c index 38a8ccf..a56687d 100644 --- a/extension/src/profiler/zend_execute.c +++ b/extension/src/profiler/zend_execute.c @@ -2,28 +2,28 @@ #if PHP_VERSION_ID < 50500 /* Pointer to the original execute function */ -static ZEND_DLEXPORT void (*_zend_execute) (zend_op_array *ops TSRMLS_DC); +static ZEND_DLEXPORT void (*_zend_execute) (zend_op_array *ops); /* Pointer to the origianl execute_internal function */ static ZEND_DLEXPORT void (*_zend_execute_internal) (zend_execute_data *data, - int ret TSRMLS_DC); + int ret); #elif PHP_MAJOR_VERSION < 7 /* Pointer to the original execute function */ -static void (*_zend_execute_ex) (zend_execute_data *execute_data TSRMLS_DC); +static void (*_zend_execute_ex) (zend_execute_data *execute_data); /* Pointer to the origianl execute_internal function */ static void (*_zend_execute_internal) (zend_execute_data *data, - struct _zend_fcall_info *fci, int ret TSRMLS_DC); + struct _zend_fcall_info *fci, int ret); #else static void (*_zend_execute_ex) (zend_execute_data *execute_data); static void (*_zend_execute_internal) (zend_execute_data *execute_data, zval *return_value); #endif /* Pointer to the original compile function */ -static zend_op_array * (*_zend_compile_file) (zend_file_handle *file_handle, int type TSRMLS_DC); +static zend_op_array * (*_zend_compile_file) (zend_file_handle *file_handle, int type); /* Pointer to the original compile string function (used by eval) */ -static zend_op_array * (*_zend_compile_string) (zval *source_string, char *filename TSRMLS_DC); +static zend_op_array * (*_zend_compile_string) (zval *source_string, char *filename); void hp_restore_original_zend_execute(void) { @@ -73,10 +73,10 @@ void hp_hijack_zend_execute(long level) { * @author hzhao, kannan */ #if PHP_VERSION_ID < 50500 -ZEND_DLEXPORT void hp_execute (zend_op_array *ops TSRMLS_DC) { +ZEND_DLEXPORT void hp_execute (zend_op_array *ops) { zend_execute_data *execute_data = EG(current_execute_data); #else -ZEND_DLEXPORT void hp_execute_ex (zend_execute_data *execute_data TSRMLS_DC) { +ZEND_DLEXPORT void hp_execute_ex (zend_execute_data *execute_data) { #endif char *func = NULL; int hp_profile_flag = 1; @@ -86,28 +86,28 @@ ZEND_DLEXPORT void hp_execute_ex (zend_execute_data *execute_data TSRMLS_DC) { start1 = cycle_timer(); if (hp_globals.profiler_level == QUANTA_MON_MODE_HIERARCHICAL) { - func = hp_get_function_name(execute_data TSRMLS_CC); + func = hp_get_function_name(execute_data); } else { - func = hp_get_function_name_fast(execute_data TSRMLS_CC); + func = hp_get_function_name_fast(execute_data); } if (!func) { #if PHP_VERSION_ID < 50500 - _zend_execute(ops TSRMLS_CC); + _zend_execute(ops); #else - _zend_execute_ex(execute_data TSRMLS_CC); + _zend_execute_ex(execute_data); #endif return; } - hp_profile_flag = hp_begin_profiling(&hp_globals.entries, func, execute_data TSRMLS_CC); + hp_profile_flag = hp_begin_profiling(&hp_globals.entries, func, execute_data); end1 = cycle_timer(); #if PHP_VERSION_ID < 50500 - _zend_execute(ops TSRMLS_CC); + _zend_execute(ops); #else - _zend_execute_ex(execute_data TSRMLS_CC); + _zend_execute_ex(execute_data); #endif start2 = cycle_timer(); - hp_end_profiling(&hp_globals.entries, hp_profile_flag, execute_data TSRMLS_CC); + hp_end_profiling(&hp_globals.entries, hp_profile_flag, execute_data); if (hp_globals.profiler_level == QUANTA_MON_MODE_HIERARCHICAL) efree(func); end2 = cycle_timer(); @@ -132,12 +132,12 @@ ZEND_DLEXPORT void hp_execute_ex (zend_execute_data *execute_data TSRMLS_DC) { #define EX_T(offset) (*(temp_variable *)((char *) EX(Ts) + offset)) ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data, - int ret TSRMLS_DC) { + int ret) { #else #define EX_T(offset) (*EX_TMP_VAR(execute_data, offset)) ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data, - struct _zend_fcall_info *fci, int ret TSRMLS_DC) { + struct _zend_fcall_info *fci, int ret) { #endif char *func = NULL; int hp_profile_flag = -1; @@ -147,36 +147,36 @@ ZEND_DLEXPORT void hp_execute_ex (zend_execute_data *execute_data TSRMLS_DC) { start1 = cycle_timer(); if (hp_globals.profiler_level == QUANTA_MON_MODE_HIERARCHICAL) { - func = hp_get_function_name(execute_data TSRMLS_CC); + func = hp_get_function_name(execute_data); } else { - func = hp_get_function_name_fast(execute_data TSRMLS_CC); + func = hp_get_function_name_fast(execute_data); } if (func) { - hp_profile_flag = hp_begin_profiling(&hp_globals.entries, func, execute_data TSRMLS_CC); + hp_profile_flag = hp_begin_profiling(&hp_globals.entries, func, execute_data); } end1 = cycle_timer(); if (!_zend_execute_internal) { #if PHP_VERSION_ID >= 70000 - execute_internal(execute_data, return_value TSRMLS_CC); + execute_internal(execute_data, return_value); #elif PHP_VERSION_ID < 50500 - execute_internal(execute_data, ret TSRMLS_CC); + execute_internal(execute_data, ret); #else - execute_internal(execute_data, fci, ret TSRMLS_CC); + execute_internal(execute_data, fci, ret); #endif } else { /* call the old override */ #if PHP_VERSION_ID >= 70000 - _zend_execute_internal(execute_data, return_value TSRMLS_CC); + _zend_execute_internal(execute_data, return_value); #elif PHP_VERSION_ID < 50500 - _zend_execute_internal(execute_data, ret TSRMLS_CC); + _zend_execute_internal(execute_data, ret); #else - _zend_execute_internal(execute_data, fci, ret TSRMLS_CC); + _zend_execute_internal(execute_data, fci, ret); #endif } start2 = cycle_timer(); if (func) { - hp_end_profiling(&hp_globals.entries, hp_profile_flag, execute_data TSRMLS_CC); + hp_end_profiling(&hp_globals.entries, hp_profile_flag, execute_data); } if (hp_globals.profiler_level == QUANTA_MON_MODE_HIERARCHICAL) efree(func); @@ -192,7 +192,7 @@ ZEND_DLEXPORT void hp_execute_ex (zend_execute_data *execute_data TSRMLS_DC) { * * @author kannan, hzhao */ -ZEND_DLEXPORT zend_op_array* hp_compile_file(zend_file_handle *file_handle, int type TSRMLS_DC) { +ZEND_DLEXPORT zend_op_array* hp_compile_file(zend_file_handle *file_handle, int type) { const char *filename; char *func; @@ -205,9 +205,9 @@ ZEND_DLEXPORT zend_op_array* hp_compile_file(zend_file_handle *file_handle, int func = (char *)emalloc(len); snprintf(func, len, "load::%s", filename); - hp_profile_flag = hp_begin_profiling(&hp_globals.entries, func, NULL TSRMLS_CC); - ret = _zend_compile_file(file_handle, type TSRMLS_CC); - hp_end_profiling(&hp_globals.entries, hp_profile_flag, NULL TSRMLS_CC); + hp_profile_flag = hp_begin_profiling(&hp_globals.entries, func, NULL); + ret = _zend_compile_file(file_handle, type); + hp_end_profiling(&hp_globals.entries, hp_profile_flag, NULL); efree(func); return ret; @@ -216,10 +216,15 @@ ZEND_DLEXPORT zend_op_array* hp_compile_file(zend_file_handle *file_handle, int /** * Proxy for zend_compile_string(). Used to profile PHP eval compilation time. */ -ZEND_DLEXPORT zend_op_array* hp_compile_string(zval *source_string, char *filename TSRMLS_DC) { - +#if PHP_VERSION_ID >= 80200 +ZEND_DLEXPORT zend_op_array* hp_compile_string(zend_string *source_string, const char *filename, zend_compile_position position) { +#elif PHP_VERSION_ID >= 80000 +ZEND_DLEXPORT zend_op_array* hp_compile_string(zend_string *source_string, const char *filename) { +#else +ZEND_DLEXPORT zend_op_array* hp_compile_string(zval *source_string, char *filename) { +#endif char *func; - int len; + size_t len; zend_op_array *ret; int hp_profile_flag = 1; @@ -227,9 +232,9 @@ ZEND_DLEXPORT zend_op_array* hp_compile_string(zval *source_string, char *filena func = (char *)emalloc(len); snprintf(func, len, "eval::%s", filename); - hp_profile_flag = hp_begin_profiling(&hp_globals.entries, func, NULL TSRMLS_CC); - ret = _zend_compile_string(source_string, filename TSRMLS_CC); - hp_end_profiling(&hp_globals.entries, hp_profile_flag, NULL TSRMLS_CC); + hp_profile_flag = hp_begin_profiling(&hp_globals.entries, func, NULL); + ret = _zend_compile_string(source_string, filename); + hp_end_profiling(&hp_globals.entries, hp_profile_flag, NULL); efree(func); return ret; } diff --git a/extension/src/profiler/zend_functions_info.c b/extension/src/profiler/zend_functions_info.c index ab148f9..a082de8 100644 --- a/extension/src/profiler/zend_functions_info.c +++ b/extension/src/profiler/zend_functions_info.c @@ -1,6 +1,6 @@ #include "quanta_mon.h" -char *hp_get_function_name_fast(zend_execute_data *execute_data TSRMLS_DC) { +char *hp_get_function_name_fast(zend_execute_data *execute_data) { #if PHP_MAJOR_VERSION < 7 return execute_data ? execute_data->function_state.function->common.function_name : NULL; #else @@ -18,7 +18,7 @@ static zend_function *hp_get_current_function(zend_execute_data *execute_data) { #endif } -const char *hp_get_class_name(zend_execute_data *data TSRMLS_DC) { +const char *hp_get_class_name(zend_execute_data *data) { const char *cls = NULL; zend_function *curr_func; @@ -47,7 +47,7 @@ const char *hp_get_class_name(zend_execute_data *data TSRMLS_DC) { * * @author kannan, hzhao */ -char *hp_get_function_name(zend_execute_data *data TSRMLS_DC) { +char *hp_get_function_name(zend_execute_data *data) { const char *func = NULL; const char *cls = NULL; char *ret = NULL; @@ -55,11 +55,11 @@ char *hp_get_function_name(zend_execute_data *data TSRMLS_DC) { if (!data || !(curr_func = hp_get_current_function(data))) return NULL; - func = hp_get_function_name_fast(data TSRMLS_CC); + func = hp_get_function_name_fast(data); if (func) { - cls = hp_get_class_name(data TSRMLS_CC); + cls = hp_get_class_name(data); if (cls) { - int len; + size_t len; len = strlen(cls) + strlen(func) + 8; ret = (char*)emalloc(len); snprintf(ret, len, "%s::%s", cls, func); @@ -116,7 +116,7 @@ char *hp_get_function_name(zend_execute_data *data TSRMLS_DC) { */ if (add_filename){ const char *filename = NULL; - int len; + size_t len; if (curr_func->op_array.filename) { #if PHP_MAJOR_VERSION < 7 diff --git a/extension/src/utils/profiler.c b/extension/src/utils/profiler.c index 862e82f..e2d24be 100644 --- a/extension/src/utils/profiler.c +++ b/extension/src/utils/profiler.c @@ -10,7 +10,7 @@ * @return void * @author kannan */ -void hp_inc_count(zval *counts, char *name, long count TSRMLS_DC) { +void hp_inc_count(zval *counts, char *name, long count) { HashTable *ht; zval *data; diff --git a/extension/src/utils/safe_call_function.c b/extension/src/utils/safe_call_function.c index ae22d0d..d3e5325 100644 --- a/extension/src/utils/safe_call_function.c +++ b/extension/src/utils/safe_call_function.c @@ -2,7 +2,7 @@ #if PHP_MAJOR_VERSION < 7 static int _safe_call_function(char *function_name, zval *object, zval *ret_val, int ret_type, -size_t call_params_count, zval *call_params[] TSRMLS_DC) { +size_t call_params_count, zval *call_params[]) { int ret; zval *params[1]; zval is_callable; @@ -17,14 +17,14 @@ size_t call_params_count, zval *call_params[] TSRMLS_DC) { } else { ZVAL_STRING_COMPAT(params[0], function_name); } - ret = call_user_function(CG(function_table), NULL, &func, &is_callable, 1, params TSRMLS_CC); + ret = call_user_function(CG(function_table), NULL, &func, &is_callable, 1, params); if (ret != SUCCESS || Z_TYPE(is_callable) != IS_BOOL || !Z_BVAL(is_callable)) { ret = FAILURE; goto end; } ZVAL_STRING_COMPAT(&func, function_name); ret = call_user_function(object ? NULL : CG(function_table), object ? &object : NULL, - &func, ret_val, call_params_count, call_params TSRMLS_CC); + &func, ret_val, call_params_count, call_params); end: FREE_ZVAL(params[0]); @@ -34,7 +34,7 @@ size_t call_params_count, zval *call_params[] TSRMLS_DC) { } #else static int _safe_call_function(char *function_name, zval *object, zval *ret_val, int ret_type, -size_t call_params_count, zval call_params[] TSRMLS_DC) { +size_t call_params_count, zval call_params[]) { int ret; zval params[1]; zval is_callable; @@ -49,10 +49,10 @@ size_t call_params_count, zval call_params[] TSRMLS_DC) { } else { ZVAL_STRING_COMPAT(¶ms[0], function_name); } - ret = call_user_function(CG(function_table), NULL, &func, &is_callable, 1, params TSRMLS_CC); + ret = call_user_function(CG(function_table), NULL, &func, &is_callable, 1, params); if (ret != SUCCESS || Z_TYPE(is_callable) != IS_TRUE) { PRINTF_QUANTA("%s::%s is not callable (%d == %d), ztype %d\n", - object ? get_obj_class_name(object TSRMLS_CC) : NULL, + object ? get_obj_class_name(object) : NULL, function_name, ret, SUCCESS, Z_TYPE(is_callable)); ret = FAILURE; @@ -60,7 +60,7 @@ size_t call_params_count, zval call_params[] TSRMLS_DC) { } ZVAL_STRING_COMPAT(&func, function_name); ret = call_user_function(object ? NULL : CG(function_table), object, - &func, ret_val, call_params_count, call_params TSRMLS_CC); + &func, ret_val, call_params_count, call_params); end: zval_dtor(¶ms[0]); @@ -75,7 +75,7 @@ size_t call_params_count, zval call_params[] TSRMLS_DC) { int safe_call_function(char *function, zval *ret, int ret_type, -size_t params_count, zval params[] TSRMLS_DC) { +size_t params_count, zval params[]) { #if PHP_MAJOR_VERSION < 7 zval *php5_params[params_count]; zval *tmp; @@ -87,17 +87,17 @@ size_t params_count, zval params[] TSRMLS_DC) { tmp = ¶ms[i]; MAKE_COPY_ZVAL(&tmp, php5_params[i]); } - retcode = _safe_call_function(function, NULL, ret, ret_type, params_count, php5_params TSRMLS_CC); + retcode = _safe_call_function(function, NULL, ret, ret_type, params_count, php5_params); for (i = 0; i < params_count; i++) FREE_ZVAL(php5_params[i]); return retcode; #else - return _safe_call_function(function, NULL, ret, ret_type, params_count, params TSRMLS_CC); + return _safe_call_function(function, NULL, ret, ret_type, params_count, params); #endif } int safe_call_method(zval *object, char *method, zval *ret, int ret_type, -size_t params_count, zval params[] TSRMLS_DC) { +size_t params_count, zval params[]) { #if PHP_MAJOR_VERSION < 7 zval *php5_params[params_count]; zval *tmp; @@ -109,11 +109,11 @@ size_t params_count, zval params[] TSRMLS_DC) { tmp = ¶ms[i]; MAKE_COPY_ZVAL(&tmp, php5_params[i]); } - retcode = _safe_call_function(method, object, ret, ret_type, params_count, php5_params TSRMLS_CC); + retcode = _safe_call_function(method, object, ret, ret_type, params_count, php5_params); for (i = 0; i < params_count; i++) FREE_ZVAL(php5_params[i]); return retcode; #else - return _safe_call_function(method, object, ret, ret_type, params_count, params TSRMLS_CC); + return _safe_call_function(method, object, ret, ret_type, params_count, params); #endif } diff --git a/extension/src/utils/safe_get_constant.c b/extension/src/utils/safe_get_constant.c index ef77f13..dc67cc2 100644 --- a/extension/src/utils/safe_get_constant.c +++ b/extension/src/utils/safe_get_constant.c @@ -1,6 +1,6 @@ #include "quanta_mon.h" -zval *safe_get_constant(const char *name, int type TSRMLS_DC) { +zval *safe_get_constant(const char *name, int type) { zval *constant; #if PHP_MAJOR_VERSION < 7 diff --git a/extension/src/utils/this.c b/extension/src/utils/this.c index 7417cf3..d1a79b2 100644 --- a/extension/src/utils/this.c +++ b/extension/src/utils/this.c @@ -1,6 +1,6 @@ #include "quanta_mon.h" -zval *get_this(zend_execute_data *execute_data TSRMLS_DC) { +zval *get_this(zend_execute_data *execute_data) { zval *this = NULL; const char *class_name; @@ -22,17 +22,17 @@ zval *get_this(zend_execute_data *execute_data TSRMLS_DC) { } this = &execute_data->This; #endif - if (!(class_name = get_obj_class_name(this TSRMLS_CC))) { + if (!(class_name = get_obj_class_name(this))) { PRINTF_QUANTA ("GET THIS: 'this' is an object of unknown class\n"); return NULL; } return this; } -zval *get_prev_this(zend_execute_data *execute_data TSRMLS_DC) { +zval *get_prev_this(zend_execute_data *execute_data) { if (!execute_data) { PRINTF_QUANTA("Cannot get this: no execute data\n"); return NULL; } - return get_this(execute_data->prev_execute_data TSRMLS_CC); + return get_this(execute_data->prev_execute_data); } diff --git a/extension/src/utils/zend_obj.c b/extension/src/utils/zend_obj.c index 989cf13..e1e926d 100644 --- a/extension/src/utils/zend_obj.c +++ b/extension/src/utils/zend_obj.c @@ -1,12 +1,12 @@ #include "quanta_mon.h" -const char *get_obj_class_name(zval *obj TSRMLS_DC) { +const char *get_obj_class_name(zval *obj) { #if PHP_MAJOR_VERSION < 7 const char *class_name; zend_uint class_name_len; if (!Z_OBJ_HANDLER_P(obj, get_class_name) - || Z_OBJ_HANDLER_P(obj, get_class_name)(obj, &class_name, &class_name_len, 0 TSRMLS_CC) != SUCCESS) + || Z_OBJ_HANDLER_P(obj, get_class_name)(obj, &class_name, &class_name_len, 0) != SUCCESS) return NULL; return class_name; #else @@ -34,14 +34,14 @@ zend_class_entry *_zend_fetch_class_compat(char *class, int flags) { #endif } -int safe_new(char *class, zval *object, int params_count, zval params[] TSRMLS_DC) { +int safe_new(char *class, zval *object, int params_count, zval params[]) { zend_class_entry *ce; zval dummy; ZVAL_NULL(&dummy); if (!(ce = _zend_fetch_class_compat(class, ZEND_FETCH_CLASS_SILENT)) || object_init_ex(object, ce) - || safe_call_method(object, "__construct", &dummy, IS_NULL, params_count, params TSRMLS_CC)) { + || safe_call_method(object, "__construct", &dummy, IS_NULL, params_count, params)) { zval_dtor(&dummy); return -1; } @@ -49,7 +49,7 @@ int safe_new(char *class, zval *object, int params_count, zval params[] TSRMLS_D return 0; } -int safe_get_class_constant(char *class, char *name, zval *retval, int type TSRMLS_DC) { +int safe_get_class_constant(char *class, char *name, zval *retval, int type) { zend_class_entry *ce; zval *constant; From 755e2593300ee86dab03ad4adde9a6f40a374809 Mon Sep 17 00:00:00 2001 From: Matthieu Rosinski Date: Thu, 3 Aug 2023 17:32:12 +0200 Subject: [PATCH 27/60] fixed potential use-after-free --- extension/src/magento2/version.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extension/src/magento2/version.c b/extension/src/magento2/version.c index 20f7d71..28a5ddb 100644 --- a/extension/src/magento2/version.c +++ b/extension/src/magento2/version.c @@ -13,6 +13,8 @@ static char *get_magento2_composer_version(FILE *composer_file_handle) { if ((end = strchr(ptr, '\"'))) { *end = 0; ptr = estrdup(ptr); + } else { + ptr = NULL; } goto end; } From 081f935656b38f02ad9117396671eb548ada8730 Mon Sep 17 00:00:00 2001 From: Matthieu Rosinski Date: Thu, 3 Aug 2023 17:32:40 +0200 Subject: [PATCH 28/60] updated gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index ea1808f..584b392 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ *.ko *.obj *.elf +*.dep # Precompiled Headers *.gch @@ -102,6 +103,7 @@ extension/config.nice extension/config.status extension/config.sub extension/configure +extension/configure.ac extension/configure.in extension/install-sh extension/libtool From 05bc427dd3accae4986c5feb92984d00ce241269 Mon Sep 17 00:00:00 2001 From: Matthieu Rosinski Date: Thu, 3 Aug 2023 17:34:22 +0200 Subject: [PATCH 29/60] added #if DEBUG_QUANTA guard to avoid compilation warnings --- extension/src/profiler/hp_end.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extension/src/profiler/hp_end.c b/extension/src/profiler/hp_end.c index 1dc770b..34bca7a 100644 --- a/extension/src/profiler/hp_end.c +++ b/extension/src/profiler/hp_end.c @@ -1,5 +1,6 @@ #include "quanta_mon.h" +#if DEBUG_QUANTA static void print_selfprofiling_metrics(void) { float profiling_time; float request_time; @@ -38,6 +39,7 @@ static void print_selfprofiling_metrics(void) { PRINTF_QUANTA("REQUEST TOTAL TIME %fms\nOVERHEAD %.3f%%\n", request_time, 100.0 * (profiling_time / request_time)); } +#endif /** * Called at request shutdown time. Cleans the profiler's global state. @@ -59,7 +61,9 @@ void hp_stop(void) { while (hp_globals.entries) hp_end_profiling(&hp_globals.entries, -1, NULL); send_metrics(); +#if DEBUG_QUANTA print_selfprofiling_metrics(); +#endif hp_restore_original_zend_execute(); /* Resore cpu affinity. */ restore_cpu_affinity(&hp_globals.prev_mask); From 54a142c7eb832f3f9a561fef92cecfe78e924ae5 Mon Sep 17 00:00:00 2001 From: Matthieu Rosinski Date: Thu, 3 Aug 2023 17:36:12 +0200 Subject: [PATCH 30/60] fixed zend_read_property usage for PHP8 --- extension/src/utils/zend_zval.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extension/src/utils/zend_zval.c b/extension/src/utils/zend_zval.c index 7a4a211..b51fd7a 100644 --- a/extension/src/utils/zend_zval.c +++ b/extension/src/utils/zend_zval.c @@ -3,7 +3,9 @@ zval *zend_read_property_compat(zend_class_entry *ce, zval *obj, const char *name) { #if PHP_MAJOR_VERSION < 7 return zend_read_property(ce, obj, name, strlen(name), 1); -#else +#elif PHP_MAJOR_VERSION < 8 return zend_read_property(ce, obj, name, strlen(name), 1, NULL); +#else + return zend_read_property(ce, Z_OBJ_P(obj), name, strlen(name), 1, NULL); #endif } From 5b7759bffbd2cffb84e34253a4ff3d060a2d4407 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Thu, 3 Aug 2023 17:36:41 +0200 Subject: [PATCH 31/60] rebuild --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2155d11..a38d5e5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,7 @@ jobs: fail-fast: false matrix: php-version: [php73, php74] #php72, php80, php81, php82 - debian-version: [buster, bullseye] #, bookworm + debian-version: [buster, bullseye] #, bookworm # steps: - name: Clone Quanta PHP Module repository From eacb0f76b62592b073a065cc184831967cd894ae Mon Sep 17 00:00:00 2001 From: Matthieu Rosinski Date: Thu, 3 Aug 2023 17:36:49 +0200 Subject: [PATCH 32/60] fixed PHP8 compat for hijacking zend_compile_string --- extension/src/profiler/zend_execute.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/extension/src/profiler/zend_execute.c b/extension/src/profiler/zend_execute.c index a56687d..7c35414 100644 --- a/extension/src/profiler/zend_execute.c +++ b/extension/src/profiler/zend_execute.c @@ -22,8 +22,14 @@ static void (*_zend_execute_internal) (zend_execute_data *execute_data, zval *re /* Pointer to the original compile function */ static zend_op_array * (*_zend_compile_file) (zend_file_handle *file_handle, int type); +#if PHP_VERSION_ID >= 80200 +static zend_op_array * (*_zend_compile_string) (zend_string *source_string, const char *filename, zend_compile_position position); /* Pointer to the original compile string function (used by eval) */ +#elif PHP_VERSION_ID >= 80000 +static zend_op_array * (*_zend_compile_string) (zend_string *source_string, const char *filename); +#else static zend_op_array * (*_zend_compile_string) (zval *source_string, char *filename); +#endif void hp_restore_original_zend_execute(void) { @@ -196,11 +202,15 @@ ZEND_DLEXPORT zend_op_array* hp_compile_file(zend_file_handle *file_handle, int const char *filename; char *func; - int len; + size_t len; zend_op_array *ret; int hp_profile_flag = 1; +#if PHP_VERSION_ID < 80100 filename = hp_get_base_filename(file_handle->filename); +#else + filename = hp_get_base_filename(ZSTR_VAL(file_handle->filename)); +#endif len = strlen("load") + strlen(filename) + 3; func = (char *)emalloc(len); snprintf(func, len, "load::%s", filename); @@ -233,7 +243,11 @@ ZEND_DLEXPORT zend_op_array* hp_compile_string(zval *source_string, char *filena snprintf(func, len, "eval::%s", filename); hp_profile_flag = hp_begin_profiling(&hp_globals.entries, func, NULL); +#if PHP_VERSION_ID < 80200 ret = _zend_compile_string(source_string, filename); +#else + ret = _zend_compile_string(source_string, filename, position); +#endif hp_end_profiling(&hp_globals.entries, hp_profile_flag, NULL); efree(func); return ret; From 5355431057c07416fd080b0a9e0cfec021bb8bdf Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Thu, 3 Aug 2023 17:50:05 +0200 Subject: [PATCH 33/60] test bullseye with php 8 --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a38d5e5..9944d12 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,8 +31,8 @@ jobs: strategy: fail-fast: false matrix: - php-version: [php73, php74] #php72, php80, php81, php82 - debian-version: [buster, bullseye] #, bookworm # + php-version: [php80] #, php81, php82 + debian-version: [bullseye] #, bookworm # steps: - name: Clone Quanta PHP Module repository From e33ece77626717bb4b15002f15b1effb4fc92ccc Mon Sep 17 00:00:00 2001 From: Matthieu Rosinski Date: Thu, 3 Aug 2023 18:39:52 +0200 Subject: [PATCH 34/60] remove support for PHP < 7 --- extension/include/compat.h | 10 --- extension/include/profiler.h | 9 --- extension/include/quanta_mon.h | 1 - extension/include/utils.h | 2 - extension/src/magento2/blocks.c | 6 +- extension/src/magento_common/blocks.c | 8 +-- extension/src/magento_common/model_data.c | 6 +- extension/src/module/quanta_mon.c | 4 -- extension/src/module/request_init.c | 19 ++--- extension/src/oro/blocks.c | 6 +- extension/src/oro/version.c | 6 +- extension/src/profiler/hier_profiler.c | 12 +--- extension/src/profiler/zend_execute.c | 65 ----------------- extension/src/profiler/zend_functions_info.c | 26 ------- extension/src/utils/profiler.c | 2 +- extension/src/utils/safe_call_function.c | 75 +------------------- extension/src/utils/safe_get_argument.c | 11 --- extension/src/utils/safe_get_constant.c | 9 --- extension/src/utils/this.c | 13 ---- extension/src/utils/zend_hash.c | 22 ------ extension/src/utils/zend_obj.c | 20 +----- extension/src/utils/zend_zval.c | 4 +- 22 files changed, 21 insertions(+), 315 deletions(-) delete mode 100644 extension/include/compat.h delete mode 100644 extension/src/utils/zend_hash.c diff --git a/extension/include/compat.h b/extension/include/compat.h deleted file mode 100644 index 302aa99..0000000 --- a/extension/include/compat.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef QUANTA_MON_COMPAT_H_ -#define QUANTA_MON_COMPAT_H_ - -#if PHP_MAJOR_VERSION < 7 - #define ZVAL_STRING_COMPAT(z, s) ZVAL_STRING(z, s, 1) -#else - #define ZVAL_STRING_COMPAT(z, s) ZVAL_STRING(z, s) -#endif - -#endif /* end of include guard: QUANTA_MON_COMPAT_H_ */ diff --git a/extension/include/profiler.h b/extension/include/profiler.h index 8728e18..4032894 100644 --- a/extension/include/profiler.h +++ b/extension/include/profiler.h @@ -183,17 +183,8 @@ hp_entry_t *hp_fast_alloc_hprof_entry(); void hp_fast_free_hprof_entry(hp_entry_t *p); // Zend hijacks -#if PHP_VERSION_ID < 50500 -ZEND_DLEXPORT void hp_execute (zend_op_array *ops); -ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data, int ret); -#elif PHP_MAJOR_VERSION < 7 -ZEND_DLEXPORT void hp_execute_ex (zend_execute_data *execute_data); -ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data, - struct _zend_fcall_info *fci, int ret); -#else ZEND_DLEXPORT void hp_execute_ex (zend_execute_data *execute_data); ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data, zval *return_value); -#endif ZEND_DLEXPORT zend_op_array* hp_compile_file(zend_file_handle *file_handle, int type); diff --git a/extension/include/quanta_mon.h b/extension/include/quanta_mon.h index 6d9e788..0cf71e6 100644 --- a/extension/include/quanta_mon.h +++ b/extension/include/quanta_mon.h @@ -32,7 +32,6 @@ #endif #include "cpu.h" -#include "compat.h" #include "profiler.h" #include "module.h" #include "utils.h" diff --git a/extension/include/utils.h b/extension/include/utils.h index 2f6aa56..245dfab 100644 --- a/extension/include/utils.h +++ b/extension/include/utils.h @@ -15,8 +15,6 @@ double get_us_from_tsc(uint64_t count, double cpu_frequency); long get_us_interval(struct timeval *start, struct timeval *end); //Compat -zval *zend_hash_find_compat(HashTable *ht, const char *key, size_t key_len); -zend_bool zend_hash_exists_compat(HashTable *ht, const char *key, size_t key_len); zval *zend_read_property_compat(zend_class_entry *ce, zval *obj, const char *name); // Safe helpers diff --git a/extension/src/magento2/blocks.c b/extension/src/magento2/blocks.c index 5128080..e65062c 100644 --- a/extension/src/magento2/blocks.c +++ b/extension/src/magento2/blocks.c @@ -15,21 +15,19 @@ static zval *get_block_object(zval *this, zval *block_name) { zval *blocks = NULL; zval *block = NULL; - blocks = zend_hash_find_compat(Z_OBJPROP_P(this), "\0*\0_blocks", sizeof("\0*\0_blocks") - 1); + blocks = zend_hash_str_find(Z_OBJPROP_P(this), "\0*\0_blocks", sizeof("\0*\0_blocks") - 1); if (!blocks) { PRINTF_QUANTA("_blocks not found\n"); return NULL; } -#if PHP_MAJOR_VERSION >= 7 if (Z_TYPE_P(blocks) == IS_INDIRECT) blocks = Z_INDIRECT_P(blocks); -#endif if (Z_TYPE_P(blocks) != IS_ARRAY) { PRINTF_QUANTA("Cannot get block object, _blocks is a %d (expected %d)\n", blocks ? Z_TYPE_P(blocks): 0, IS_ARRAY); return NULL; } - block = zend_hash_find_compat(Z_ARRVAL_P(blocks), Z_STRVAL_P(block_name), Z_STRLEN_P(block_name)); + block = zend_hash_str_find(Z_ARRVAL_P(blocks), Z_STRVAL_P(block_name), Z_STRLEN_P(block_name)); if (!block || Z_TYPE_P(block) != IS_OBJECT) { PRINTF_QUANTA("Cannot get block %s (it's a %d)\n", Z_STRVAL_P(block_name), block ? Z_TYPE_P(block) : 0); diff --git a/extension/src/magento_common/blocks.c b/extension/src/magento_common/blocks.c index dab590c..e5cced8 100644 --- a/extension/src/magento_common/blocks.c +++ b/extension/src/magento_common/blocks.c @@ -17,11 +17,7 @@ char *magento_get_block_class_file(zval *block) { PRINTF_QUANTA("Cannot get block class file\n"); return NULL; } -#if PHP_MAJOR_VERSION < 7 - return estrdup(ce->info.user.filename); -#else return estrdup(ZSTR_VAL(ce->info.user.filename)); -#endif } char *magento_get_block_attr(const char *key, size_t key_len, zval *this) { @@ -29,14 +25,12 @@ char *magento_get_block_attr(const char *key, size_t key_len, zval *this) { HashTable *block; block = Z_OBJPROP_P(this); - if (!(data = zend_hash_find_compat(block, key, key_len))) { + if (!(data = zend_hash_str_find(block, key, key_len))) { PRINTF_QUANTA("Cannot extract attr %s from block\n", key + 3); return NULL; } -#if PHP_MAJOR_VERSION >= 7 if (Z_TYPE_P(data) == IS_INDIRECT) data = Z_INDIRECT_P(data); -#endif if (Z_TYPE_P(data) != IS_STRING) { PRINTF_QUANTA("Block attr %s is not a string (it's a %d)\n", key + 3, Z_TYPE_P(data)); return NULL; diff --git a/extension/src/magento_common/model_data.c b/extension/src/magento_common/model_data.c index 0144965..45a6efa 100644 --- a/extension/src/magento_common/model_data.c +++ b/extension/src/magento_common/model_data.c @@ -4,19 +4,17 @@ zval *get_mage_model_zdata(HashTable *attrs, char *key, int type) { zval *data; zval *ret; - if (!(data = zend_hash_find_compat(attrs, "\0*\0_data", sizeof("\0*\0_data") - 1))) { + if (!(data = zend_hash_str_find(attrs, "\0*\0_data", sizeof("\0*\0_data") - 1))) { PRINTF_QUANTA("Cannot fetch model data\n"); return NULL; } -#if PHP_MAJOR_VERSION >= 7 if (Z_TYPE_P(data) == IS_INDIRECT) data = Z_INDIRECT_P(data); -#endif if (Z_TYPE_P(data) != IS_ARRAY) { PRINTF_QUANTA("_data is not an array\n"); return NULL; } - if (!(ret = zend_hash_find_compat(Z_ARRVAL_P(data), key, strlen(key)))) { + if (!(ret = zend_hash_str_find(Z_ARRVAL_P(data), key, strlen(key)))) { PRINTF_QUANTA("Cannot fetch %s in model data\n", key); return NULL; } diff --git a/extension/src/module/quanta_mon.c b/extension/src/module/quanta_mon.c index a9f82bd..1dbe9aa 100644 --- a/extension/src/module/quanta_mon.c +++ b/extension/src/module/quanta_mon.c @@ -8,9 +8,7 @@ /* Callback functions for the quanta_mon extension */ zend_module_entry quanta_mon_module_entry = { -#if ZEND_MODULE_API_NO >= 20010901 STANDARD_MODULE_HEADER, -#endif "quanta_mon", /* Name of the extension */ NULL, /* List of functions exposed */ PHP_MINIT(quanta_mon), /* Module init callback */ @@ -18,9 +16,7 @@ zend_module_entry quanta_mon_module_entry = { PHP_RINIT(quanta_mon), /* Request init callback */ PHP_RSHUTDOWN(quanta_mon), /* Request shutdown callback */ PHP_MINFO(quanta_mon), /* Module info callback */ -#if ZEND_MODULE_API_NO >= 20010901 QUANTA_MON_VERSION, -#endif STANDARD_MODULE_PROPERTIES }; diff --git a/extension/src/module/request_init.c b/extension/src/module/request_init.c index ac13f0f..127f342 100644 --- a/extension/src/module/request_init.c +++ b/extension/src/module/request_init.c @@ -3,7 +3,7 @@ static char *extract_request_uri(HashTable *_SERVER) { zval *request_uri; - request_uri = zend_hash_find_compat(_SERVER, "REQUEST_URI", sizeof("REQUEST_URI") - 1); + request_uri = zend_hash_str_find(_SERVER, "REQUEST_URI", sizeof("REQUEST_URI") - 1); if (!request_uri || Z_TYPE_P(request_uri) != IS_STRING) { PRINTF_QUANTA("NO REQUEST URI\n"); return NULL; @@ -18,7 +18,7 @@ static int extract_step_clock_and_mode(HashTable *_SERVER) { char *quanta_mode; char *quanta_clock; - data = zend_hash_find_compat(_SERVER, QUANTA_HTTP_HEADER, sizeof(QUANTA_HTTP_HEADER) - 1); + data = zend_hash_str_find(_SERVER, QUANTA_HTTP_HEADER, sizeof(QUANTA_HTTP_HEADER) - 1); if (!data || Z_TYPE_P(data) != IS_STRING) { PRINTF_QUANTA("NO QUANTA HEADER\n"); return -1; @@ -48,26 +48,17 @@ static int extract_step_clock_and_mode(HashTable *_SERVER) { static void arm_server_auto_global() { zend_auto_global* auto_global; -#if PHP_MAJOR_VERSION >= 7 zval *auto_global_zval; -#endif - if (zend_hash_exists_compat(&EG(symbol_table), "_SERVER", sizeof("_SERVER"))) + if (zend_hash_str_exists(&EG(symbol_table), "_SERVER", sizeof("_SERVER"))) return; -#if PHP_MAJOR_VERSION < 7 - if (zend_hash_find(CG(auto_globals), "_SERVER", sizeof("_SERVER"), (void **)&auto_global) == FAILURE) - return; - auto_global->armed = auto_global->auto_global_callback(auto_global->name, - auto_global->name_len); -#else - auto_global_zval = zend_hash_find_compat(CG(auto_globals), "_SERVER", sizeof("_SERVER") - 1); + auto_global_zval = zend_hash_str_find(CG(auto_globals), "_SERVER", sizeof("_SERVER") - 1); if (!auto_global_zval) { return; } auto_global = (zend_auto_global *)Z_PTR_P(auto_global_zval); if (auto_global) auto_global->armed = auto_global->auto_global_callback(auto_global->name); -#endif } /* We get needed informations in http header QUANTA_HTTP_HEADER: @@ -83,7 +74,7 @@ static int extract_headers_info(void) { hp_globals.quanta_clock = 0; arm_server_auto_global(); - zserver = zend_hash_find_compat(&EG(symbol_table), "_SERVER", sizeof("_SERVER") - 1); + zserver = zend_hash_str_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER") - 1); if (!zserver || Z_TYPE_P(zserver) != IS_ARRAY) { PRINTF_QUANTA("NO _SERVER\n"); return -1; diff --git a/extension/src/oro/blocks.c b/extension/src/oro/blocks.c index 57ac9c1..9c359b2 100644 --- a/extension/src/oro/blocks.c +++ b/extension/src/oro/blocks.c @@ -4,21 +4,19 @@ static zval *get_block_var(zval *block, const char * key, int type) { zval *data; zval *ret; - if (!(data = zend_hash_find_compat(Z_OBJPROP_P(block), "vars", sizeof("vars") - 1))) { + if (!(data = zend_hash_str_find(Z_OBJPROP_P(block), "vars", sizeof("vars") - 1))) { PRINTF_QUANTA("Cannot fetch block vars\n"); return NULL; } -#if PHP_MAJOR_VERSION >= 7 if (Z_TYPE_P(data) == IS_INDIRECT) data = Z_INDIRECT_P(data); -#endif if (Z_TYPE_P(data) == IS_REFERENCE) data = Z_REFVAL_P(data); if (Z_TYPE_P(data) != IS_ARRAY) { PRINTF_QUANTA("vars is not an array, it's a %d\n", Z_TYPE_P(data)); return NULL; } - if (!(ret = zend_hash_find_compat(Z_ARRVAL_P(data), key, strlen(key)))) { + if (!(ret = zend_hash_str_find(Z_ARRVAL_P(data), key, strlen(key)))) { PRINTF_QUANTA("Cannot fetch %s in vars\n", key); return NULL; } diff --git a/extension/src/oro/version.c b/extension/src/oro/version.c index 77b28b4..1b2d967 100644 --- a/extension/src/oro/version.c +++ b/extension/src/oro/version.c @@ -44,11 +44,7 @@ static char *get_oro_vendor_file(zend_execute_data *execute_data) { PRINTF_QUANTA("ORO DIRECTORY NOT FOUND\n"); return NULL; } - #if PHP_MAJOR_VERSION < 7 - this_filename = ce->info.user.filename; - #else - this_filename = ZSTR_VAL(ce->info.user.filename); - #endif + this_filename = ZSTR_VAL(ce->info.user.filename); if (!(end = rindex(this_filename, '/'))) return NULL; filename = ecalloc((end - this_filename) + 1 - strlen("app")+ strlen(installed_file), 1); diff --git a/extension/src/profiler/hier_profiler.c b/extension/src/profiler/hier_profiler.c index 60bd5c3..c2887d2 100644 --- a/extension/src/profiler/hier_profiler.c +++ b/extension/src/profiler/hier_profiler.c @@ -44,9 +44,7 @@ void hp_hier_end_profiling(hp_entry_t **entries) { long int pmu_end; uint64_t tsc_end; HashTable *ht; -#if PHP_MAJOR_VERSION >= 7 zval counts_val; -#endif hp_globals.func_hash_counters[top->hash_code]--; tsc_end = cycle_timer(); @@ -55,16 +53,10 @@ void hp_hier_end_profiling(hp_entry_t **entries) { || !(ht = HASH_OF(&hp_globals.stats_count))) { return; } - if (!(counts = zend_hash_find_compat(ht, symbol, strlen(symbol)))) { -#if PHP_MAJOR_VERSION < 7 - MAKE_STD_ZVAL(counts); - array_init(counts); - zend_hash_update(ht, symbol, strlen(symbol) + 1, &counts, sizeof(counts), NULL); -#else + if (!(counts = zend_hash_str_find(ht, symbol, strlen(symbol)))) { counts = &counts_val; array_init(counts); zend_hash_str_update(ht, symbol, strlen(symbol), counts); -#endif } hp_inc_count(counts, "ct", 1 ); @@ -78,7 +70,7 @@ void hp_hier_end_profiling(hp_entry_t **entries) { hp_inc_count(counts, "cpu", get_us_interval(&(top->ru_start_hprof.ru_utime), &(ru_end.ru_utime)) + get_us_interval(&(top->ru_start_hprof.ru_stime), &(ru_end.ru_stime)) - ); + ); /* Get Memory usage */ mu_end = zend_memory_usage(0); diff --git a/extension/src/profiler/zend_execute.c b/extension/src/profiler/zend_execute.c index 7c35414..b8647bf 100644 --- a/extension/src/profiler/zend_execute.c +++ b/extension/src/profiler/zend_execute.c @@ -1,23 +1,7 @@ #include "quanta_mon.h" -#if PHP_VERSION_ID < 50500 -/* Pointer to the original execute function */ -static ZEND_DLEXPORT void (*_zend_execute) (zend_op_array *ops); - -/* Pointer to the origianl execute_internal function */ -static ZEND_DLEXPORT void (*_zend_execute_internal) (zend_execute_data *data, - int ret); -#elif PHP_MAJOR_VERSION < 7 -/* Pointer to the original execute function */ -static void (*_zend_execute_ex) (zend_execute_data *execute_data); - -/* Pointer to the origianl execute_internal function */ -static void (*_zend_execute_internal) (zend_execute_data *data, - struct _zend_fcall_info *fci, int ret); -#else static void (*_zend_execute_ex) (zend_execute_data *execute_data); static void (*_zend_execute_internal) (zend_execute_data *execute_data, zval *return_value); -#endif /* Pointer to the original compile function */ static zend_op_array * (*_zend_compile_file) (zend_file_handle *file_handle, int type); @@ -34,28 +18,17 @@ static zend_op_array * (*_zend_compile_string) (zval *source_string, char *filen void hp_restore_original_zend_execute(void) { /* Remove proxies, restore the originals */ - #if PHP_VERSION_ID < 50500 - zend_execute = _zend_execute; - #else zend_execute_ex = _zend_execute_ex; - #endif zend_execute_internal = _zend_execute_internal; zend_compile_file = _zend_compile_file; zend_compile_string = _zend_compile_string; } void hp_hijack_zend_execute(long level) { -#if PHP_VERSION_ID < 50500 - _zend_execute = zend_execute; - zend_execute = hp_execute; -#else _zend_execute_ex = zend_execute_ex; zend_execute_ex = hp_execute_ex; -#endif - _zend_execute_internal = zend_execute_internal; zend_execute_internal = hp_execute_internal; - _zend_compile_file = zend_compile_file; _zend_compile_string = zend_compile_string; if (level == QUANTA_MON_MODE_HIERARCHICAL) { @@ -78,12 +51,7 @@ void hp_hijack_zend_execute(long level) { * * @author hzhao, kannan */ -#if PHP_VERSION_ID < 50500 -ZEND_DLEXPORT void hp_execute (zend_op_array *ops) { - zend_execute_data *execute_data = EG(current_execute_data); -#else ZEND_DLEXPORT void hp_execute_ex (zend_execute_data *execute_data) { -#endif char *func = NULL; int hp_profile_flag = 1; uint64_t start1, start2; @@ -97,21 +65,13 @@ ZEND_DLEXPORT void hp_execute_ex (zend_execute_data *execute_data) { func = hp_get_function_name_fast(execute_data); } if (!func) { -#if PHP_VERSION_ID < 50500 - _zend_execute(ops); -#else _zend_execute_ex(execute_data); -#endif return; } hp_profile_flag = hp_begin_profiling(&hp_globals.entries, func, execute_data); end1 = cycle_timer(); -#if PHP_VERSION_ID < 50500 - _zend_execute(ops); -#else _zend_execute_ex(execute_data); -#endif start2 = cycle_timer(); hp_end_profiling(&hp_globals.entries, hp_profile_flag, execute_data); if (hp_globals.profiler_level == QUANTA_MON_MODE_HIERARCHICAL) @@ -132,19 +92,7 @@ ZEND_DLEXPORT void hp_execute_ex (zend_execute_data *execute_data) { * * @author hzhao, kannan */ - #if PHP_VERSION_ID >= 70000 ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data, zval *return_value) { - #elif PHP_VERSION_ID < 50500 - #define EX_T(offset) (*(temp_variable *)((char *) EX(Ts) + offset)) - - ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data, - int ret) { - #else - #define EX_T(offset) (*EX_TMP_VAR(execute_data, offset)) - - ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data, - struct _zend_fcall_info *fci, int ret) { - #endif char *func = NULL; int hp_profile_flag = -1; uint64_t start1, start2; @@ -163,22 +111,9 @@ ZEND_DLEXPORT void hp_execute_ex (zend_execute_data *execute_data) { end1 = cycle_timer(); if (!_zend_execute_internal) { - #if PHP_VERSION_ID >= 70000 execute_internal(execute_data, return_value); - #elif PHP_VERSION_ID < 50500 - execute_internal(execute_data, ret); - #else - execute_internal(execute_data, fci, ret); - #endif } else { - /* call the old override */ - #if PHP_VERSION_ID >= 70000 _zend_execute_internal(execute_data, return_value); - #elif PHP_VERSION_ID < 50500 - _zend_execute_internal(execute_data, ret); - #else - _zend_execute_internal(execute_data, fci, ret); - #endif } start2 = cycle_timer(); if (func) { diff --git a/extension/src/profiler/zend_functions_info.c b/extension/src/profiler/zend_functions_info.c index a082de8..a158454 100644 --- a/extension/src/profiler/zend_functions_info.c +++ b/extension/src/profiler/zend_functions_info.c @@ -1,21 +1,13 @@ #include "quanta_mon.h" char *hp_get_function_name_fast(zend_execute_data *execute_data) { -#if PHP_MAJOR_VERSION < 7 - return execute_data ? execute_data->function_state.function->common.function_name : NULL; -#else return (execute_data && execute_data->func && execute_data->func->common.function_name) ? ZSTR_VAL(execute_data->func->common.function_name) : NULL; -#endif } static zend_function *hp_get_current_function(zend_execute_data *execute_data) { -#if PHP_MAJOR_VERSION < 7 - return execute_data ? execute_data->function_state.function : NULL; -#else return execute_data ? execute_data->func : NULL; -#endif } const char *hp_get_class_name(zend_execute_data *data) { @@ -24,19 +16,11 @@ const char *hp_get_class_name(zend_execute_data *data) { if (!(curr_func = hp_get_current_function(data))) return NULL; -#if PHP_MAJOR_VERSION < 7 - if (curr_func->common.scope) { - cls = curr_func->common.scope->name; - } else if (data->object) { - cls = Z_OBJCE_P(data->object)->name; - } -#else if (curr_func->common.scope && curr_func->common.scope->name) { cls = ZSTR_VAL(curr_func->common.scope->name); } else if (Z_OBJ(data->This) && Z_OBJCE(data->This)->name) { cls = ZSTR_VAL(Z_OBJCE(data->This)->name); } -#endif return cls; } @@ -73,17 +57,11 @@ char *hp_get_function_name(zend_execute_data *data) { /* we are dealing with a special directive/function like * include, eval, etc. */ -#if ZEND_EXTENSION_API_NO >= 220121212 if (data->prev_execute_data) { curr_op = data->prev_execute_data->opline->extended_value; } else { curr_op = data->opline->extended_value; } -#elif ZEND_EXTENSION_API_NO >= 220100525 - curr_op = data->opline->extended_value; -#else - curr_op = data->opline->op2.u.constant.value.lval; -#endif switch (curr_op) { case ZEND_EVAL: @@ -119,11 +97,7 @@ char *hp_get_function_name(zend_execute_data *data) { size_t len; if (curr_func->op_array.filename) { -#if PHP_MAJOR_VERSION < 7 - filename = hp_get_base_filename(curr_func->op_array.filename); -#else filename = hp_get_base_filename(ZSTR_VAL(curr_func->op_array.filename)); -#endif } if (!filename) filename = "???"; diff --git a/extension/src/utils/profiler.c b/extension/src/utils/profiler.c index e2d24be..b445d8f 100644 --- a/extension/src/utils/profiler.c +++ b/extension/src/utils/profiler.c @@ -18,7 +18,7 @@ void hp_inc_count(zval *counts, char *name, long count) { ht = HASH_OF(counts); if (!ht) return; - if ((data = zend_hash_find_compat(ht, name, strlen(name)))) { + if ((data = zend_hash_str_find(ht, name, strlen(name)))) { ZVAL_LONG(data, Z_LVAL_P(data) + count); } else { add_assoc_long(counts, name, count); diff --git a/extension/src/utils/safe_call_function.c b/extension/src/utils/safe_call_function.c index d3e5325..24f6b3c 100644 --- a/extension/src/utils/safe_call_function.c +++ b/extension/src/utils/safe_call_function.c @@ -1,38 +1,5 @@ #include "quanta_mon.h" -#if PHP_MAJOR_VERSION < 7 -static int _safe_call_function(char *function_name, zval *object, zval *ret_val, int ret_type, -size_t call_params_count, zval *call_params[]) { - int ret; - zval *params[1]; - zval is_callable; - zval func; - - MAKE_STD_ZVAL(params[0]); - ZVAL_STRING_COMPAT(&func, "is_callable"); - if (object) { - array_init(params[0]); - add_next_index_zval(params[0], object); - add_next_index_string(params[0], function_name, 1); - } else { - ZVAL_STRING_COMPAT(params[0], function_name); - } - ret = call_user_function(CG(function_table), NULL, &func, &is_callable, 1, params); - if (ret != SUCCESS || Z_TYPE(is_callable) != IS_BOOL || !Z_BVAL(is_callable)) { - ret = FAILURE; - goto end; - } - ZVAL_STRING_COMPAT(&func, function_name); - ret = call_user_function(object ? NULL : CG(function_table), object ? &object : NULL, - &func, ret_val, call_params_count, call_params); - -end: - FREE_ZVAL(params[0]); - zval_dtor(&is_callable); - zval_dtor(&func); - return ret != SUCCESS || Z_TYPE_P(ret_val) != ret_type ? -1 : 0; -} -#else static int _safe_call_function(char *function_name, zval *object, zval *ret_val, int ret_type, size_t call_params_count, zval call_params[]) { int ret; @@ -40,14 +7,14 @@ size_t call_params_count, zval call_params[]) { zval is_callable; zval func; - ZVAL_STRING_COMPAT(&func, "is_callable"); + ZVAL_STRING(&func, "is_callable"); ZVAL_NULL(&is_callable); if (object) { array_init(¶ms[0]); add_next_index_zval(¶ms[0], object); add_next_index_string(¶ms[0], function_name); } else { - ZVAL_STRING_COMPAT(¶ms[0], function_name); + ZVAL_STRING(¶ms[0], function_name); } ret = call_user_function(CG(function_table), NULL, &func, &is_callable, 1, params); if (ret != SUCCESS || Z_TYPE(is_callable) != IS_TRUE) { @@ -58,7 +25,7 @@ size_t call_params_count, zval call_params[]) { ret = FAILURE; goto end; } - ZVAL_STRING_COMPAT(&func, function_name); + ZVAL_STRING(&func, function_name); ret = call_user_function(object ? NULL : CG(function_table), object, &func, ret_val, call_params_count, call_params); @@ -71,49 +38,13 @@ size_t call_params_count, zval call_params[]) { Z_TYPE_P(ret_val), ret_type); return ret != SUCCESS || Z_TYPE_P(ret_val) != ret_type ? -1 : 0; } -#endif - int safe_call_function(char *function, zval *ret, int ret_type, size_t params_count, zval params[]) { -#if PHP_MAJOR_VERSION < 7 - zval *php5_params[params_count]; - zval *tmp; - size_t i; - int retcode; - - for (i = 0; i < params_count; i++) { - MAKE_STD_ZVAL(php5_params[i]); - tmp = ¶ms[i]; - MAKE_COPY_ZVAL(&tmp, php5_params[i]); - } - retcode = _safe_call_function(function, NULL, ret, ret_type, params_count, php5_params); - for (i = 0; i < params_count; i++) - FREE_ZVAL(php5_params[i]); - return retcode; -#else return _safe_call_function(function, NULL, ret, ret_type, params_count, params); -#endif } int safe_call_method(zval *object, char *method, zval *ret, int ret_type, size_t params_count, zval params[]) { -#if PHP_MAJOR_VERSION < 7 - zval *php5_params[params_count]; - zval *tmp; - size_t i; - int retcode; - - for (i = 0; i < params_count; i++) { - MAKE_STD_ZVAL(php5_params[i]); - tmp = ¶ms[i]; - MAKE_COPY_ZVAL(&tmp, php5_params[i]); - } - retcode = _safe_call_function(method, object, ret, ret_type, params_count, php5_params); - for (i = 0; i < params_count; i++) - FREE_ZVAL(php5_params[i]); - return retcode; -#else return _safe_call_function(method, object, ret, ret_type, params_count, params); -#endif } diff --git a/extension/src/utils/safe_get_argument.c b/extension/src/utils/safe_get_argument.c index 8a328fe..0a475f4 100644 --- a/extension/src/utils/safe_get_argument.c +++ b/extension/src/utils/safe_get_argument.c @@ -5,21 +5,10 @@ zval *safe_get_argument(zend_execute_data *ex, size_t num, int type) { if (!ex) return NULL; -#if PHP_MAJOR_VERSION < 7 -# if PHP_VERSION_ID >= 50500 - if (!ex->function_state.arguments) - ex = ex->prev_execute_data; -# endif - if (!ex || (size_t)(zend_uintptr_t)ex->function_state.arguments[0] < num) - return NULL; - ret = (zval *)ex->function_state.arguments[ - -((size_t)(zend_uintptr_t)ex->function_state.arguments[0] - (num - 1))]; -#else if (ZEND_CALL_NUM_ARGS(ex) < num) { return NULL; } ret = ZEND_CALL_ARG(ex, num); -#endif if (!ret || Z_TYPE_P(ret) != type) return NULL; return ret; diff --git a/extension/src/utils/safe_get_constant.c b/extension/src/utils/safe_get_constant.c index dc67cc2..72a9ade 100644 --- a/extension/src/utils/safe_get_constant.c +++ b/extension/src/utils/safe_get_constant.c @@ -3,17 +3,8 @@ zval *safe_get_constant(const char *name, int type) { zval *constant; -#if PHP_MAJOR_VERSION < 7 - MAKE_STD_ZVAL(constant); - if (!zend_get_constant(name, strlen(name), constant) || Z_TYPE_P(constant) != type) { - FREE_ZVAL(constant); - return NULL; - } -#else if (!(constant = zend_get_constant_str(name, strlen(name))) || Z_TYPE_P(constant) != type) { return NULL; } -#endif - return constant; } diff --git a/extension/src/utils/this.c b/extension/src/utils/this.c index d1a79b2..8edf193 100644 --- a/extension/src/utils/this.c +++ b/extension/src/utils/this.c @@ -4,24 +4,11 @@ zval *get_this(zend_execute_data *execute_data) { zval *this = NULL; const char *class_name; -#if PHP_MAJOR_VERSION < 7 -# if PHP_VERSION_ID >= 50500 - if (!execute_data->current_this) - execute_data = execute_data->prev_execute_data; -# endif - if (!execute_data - || !(this = execute_data->current_this) - || Z_TYPE_P(this) != IS_OBJECT) { - PRINTF_QUANTA ("Cannot get this (pun intended) execute_data %p this %p\n", execute_data, this); - return NULL; - } -#else if (!execute_data || !Z_OBJ(execute_data->This)) { PRINTF_QUANTA ("Cannot get this (pun intended) execute_data %p this %p\n", execute_data, this); return NULL; } this = &execute_data->This; -#endif if (!(class_name = get_obj_class_name(this))) { PRINTF_QUANTA ("GET THIS: 'this' is an object of unknown class\n"); return NULL; diff --git a/extension/src/utils/zend_hash.c b/extension/src/utils/zend_hash.c deleted file mode 100644 index 744cf27..0000000 --- a/extension/src/utils/zend_hash.c +++ /dev/null @@ -1,22 +0,0 @@ -#include "quanta_mon.h" - -zval *zend_hash_find_compat(HashTable *ht, const char *key, size_t key_len) { -#if PHP_MAJOR_VERSION < 7 - zval **data; - - if (zend_hash_find(ht, key, key_len + 1, (void **)&data) == FAILURE) { - return NULL; - } - return *data; -#else - return zend_hash_str_find(ht, key, key_len); -#endif -} - -zend_bool zend_hash_exists_compat(HashTable *ht, const char *key, size_t key_len) { -#if PHP_MAJOR_VERSION < 7 - return zend_hash_exists(ht, key, key_len); -#else - return zend_hash_str_exists(ht, key, key_len); -#endif -} diff --git a/extension/src/utils/zend_obj.c b/extension/src/utils/zend_obj.c index e1e926d..4acc6af 100644 --- a/extension/src/utils/zend_obj.c +++ b/extension/src/utils/zend_obj.c @@ -1,28 +1,15 @@ #include "quanta_mon.h" const char *get_obj_class_name(zval *obj) { -#if PHP_MAJOR_VERSION < 7 - const char *class_name; - zend_uint class_name_len; - - if (!Z_OBJ_HANDLER_P(obj, get_class_name) - || Z_OBJ_HANDLER_P(obj, get_class_name)(obj, &class_name, &class_name_len, 0) != SUCCESS) - return NULL; - return class_name; -#else zend_string *class_name; if (!(class_name = Z_OBJ_HANDLER_P(obj, get_class_name)(Z_OBJ_P(obj)))) return NULL; return ZSTR_VAL(class_name); -#endif } zend_class_entry *_zend_fetch_class_compat(char *class, int flags) { -#if PHP_MAJOR_VERSION < 7 - return zend_fetch_class(class, strlen(class), flags); -#else zend_class_entry *ce; zend_string *class_name = zend_string_init(class, strlen(class), 0); @@ -31,7 +18,6 @@ zend_class_entry *_zend_fetch_class_compat(char *class, int flags) { ce = zend_fetch_class(class_name, flags); zend_string_release(class_name); return ce; -#endif } int safe_new(char *class, zval *object, int params_count, zval params[]) { @@ -57,7 +43,7 @@ int safe_get_class_constant(char *class, char *name, zval *retval, int type) { PRINTF_QUANTA("Cannot find zend_class_entry for class %s\n", class); return -1; } - if (!(constant = zend_hash_find_compat(&ce->constants_table, name, strlen(name)))) { + if (!(constant = zend_hash_str_find(&ce->constants_table, name, strlen(name)))) { PRINTF_QUANTA("Cannot find constant %s::%s\n", class, name); return -1; } @@ -66,10 +52,6 @@ int safe_get_class_constant(char *class, char *name, zval *retval, int type) { class, name, type, Z_TYPE_P(constant)); return -1; } -#if PHP_MAJOR_VERSION < 7 - MAKE_COPY_ZVAL(&constant, retval) -#else ZVAL_DUP(retval, constant); -#endif return 0; } diff --git a/extension/src/utils/zend_zval.c b/extension/src/utils/zend_zval.c index b51fd7a..0d15303 100644 --- a/extension/src/utils/zend_zval.c +++ b/extension/src/utils/zend_zval.c @@ -1,9 +1,7 @@ #include "quanta_mon.h" zval *zend_read_property_compat(zend_class_entry *ce, zval *obj, const char *name) { -#if PHP_MAJOR_VERSION < 7 - return zend_read_property(ce, obj, name, strlen(name), 1); -#elif PHP_MAJOR_VERSION < 8 +#if PHP_MAJOR_VERSION < 8 return zend_read_property(ce, obj, name, strlen(name), 1, NULL); #else return zend_read_property(ce, Z_OBJ_P(obj), name, strlen(name), 1, NULL); From f8a70c5e6610709c16681179548781adc0ad9ddc Mon Sep 17 00:00:00 2001 From: Matthieu Rosinski Date: Thu, 3 Aug 2023 18:42:22 +0200 Subject: [PATCH 35/60] remove deleted files from config.m4 --- extension/config.m4 | 1 - 1 file changed, 1 deletion(-) diff --git a/extension/config.m4 b/extension/config.m4 index ade4e21..0c469fc 100644 --- a/extension/config.m4 +++ b/extension/config.m4 @@ -72,7 +72,6 @@ if test "$PHP_QUANTAMON" != "no"; then src/utils/safe_get_constant.c \ src/utils/this.c \ src/utils/timing.c \ - src/utils/zend_hash.c \ src/utils/zend_obj.c \ src/utils/zend_zval.c \ src/applications.c, $ext_shared,,-W -Wall -Wextra -Wno-unused-parameter -D_GNU_SOURCE) From 46b27e857e11dbedcedf5ce6ac6c2988afe3e82b Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Fri, 4 Aug 2023 15:10:27 +0200 Subject: [PATCH 36/60] try version 81 82 83 full bullseye --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9944d12..b7db875 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: [php80] #, php81, php82 + php-version: [php73, php74, php80, php81, php82, php83] debian-version: [bullseye] #, bookworm # steps: From 0b993421c46e82b759339962817cb9d15f819cc3 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Fri, 4 Aug 2023 15:56:48 +0200 Subject: [PATCH 37/60] try all php versions on bookworm --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b7db875..53a53f9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,7 @@ jobs: fail-fast: false matrix: php-version: [php73, php74, php80, php81, php82, php83] - debian-version: [bullseye] #, bookworm # + debian-version: [bookworm] steps: - name: Clone Quanta PHP Module repository From 7cfa7d516fab9b0e59338306c9a5bc25645c519b Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Tue, 8 Aug 2023 14:52:15 +0200 Subject: [PATCH 38/60] add centos --- .github/workflows/main.yml | 63 +++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 53a53f9..98c188d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -60,38 +60,39 @@ jobs: name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz path: tools/debian/${{ matrix.debian-version }}/pkg/ - # centos-builds: - # if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') - # environment: build - # name: 'Building ${{ matrix.php-version }} for CentOS ${{ matrix.centos-version }}' - # runs-on: ubuntu-latest - # strategy: - # fail-fast: false - # matrix: - # php-version: [php73, php74] #php72, php80, php81, php82 - # centos-version: [7] #8 + centos-builds: + if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') + environment: build + name: 'Building ${{ matrix.php-version }} for CentOS ${{ matrix.centos-version }}' + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php-version: [php73, php74, php80, php81, php82, php83] + centos-version: [7] #8 - # steps: - # - name: Clone Quanta PHP Module repository - # uses: actions/checkout@v3 - # with: - # path: php-module + steps: + - name: Clone Quanta PHP Module repository + uses: actions/checkout@v3 + with: + path: php-module - # - name: Clone Buildozer repository - # uses: actions/checkout@v3 - # with: - # ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} - # repository: quanta-computing/buildozer - # persist-credentials: true - # path: tools + - name: Clone Buildozer repository + uses: actions/checkout@v3 + with: + ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} + repository: quanta-computing/buildozer + ref: 'new-packages-worflow' + persist-credentials: true + path: tools - # - name: Build the PHP package - # run: | - # cd tools - # ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -s ../php-module/extension/ -r centos-${{ matrix.centos-version }} + - name: Build the PHP package + run: | + cd tools + ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -s ../php-module/extension/ -r 1.3.4 - # - name: Upload packages - # uses: actions/upload-artifact@v3 - # with: - # name: centos-${{ matrix.centos-version }}-${{ matrix.php-version }}.tgz - # path: tools/centos/${{ matrix.centos-version }}/pkg/ + - name: Upload packages + uses: actions/upload-artifact@v3 + with: + name: centos-${{ matrix.centos-version }}-${{ matrix.php-version }}.tgz + path: tools/centos/${{ matrix.centos-version }}/pkg/ From 0b7f000e51d94dd30aedcae5b1de0d3cba1155b0 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Wed, 9 Aug 2023 10:05:09 +0200 Subject: [PATCH 39/60] try auto build for centos 7 full versions --- .github/workflows/main.yml | 64 +++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 98c188d..39c035e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,42 +23,42 @@ env: PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - debian-builds: - if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') - environment: build - name: 'Building ${{ matrix.php-version }} for Debian ${{ matrix.debian-version }}' - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php-version: [php73, php74, php80, php81, php82, php83] - debian-version: [bookworm] + # debian-builds: + # if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') + # environment: build + # name: 'Building ${{ matrix.php-version }} for Debian ${{ matrix.debian-version }}' + # runs-on: ubuntu-latest + # strategy: + # fail-fast: false + # matrix: + # php-version: [php73, php74, php80, php81, php82, php83] + # debian-version: [bookworm] - steps: - - name: Clone Quanta PHP Module repository - uses: actions/checkout@v3 - with: - path: php-module + # steps: + # - name: Clone Quanta PHP Module repository + # uses: actions/checkout@v3 + # with: + # path: php-module - - name: Clone Buildozer repository - uses: actions/checkout@v3 - with: - ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} - repository: quanta-computing/buildozer - ref: 'new-packages-worflow' - persist-credentials: true - path: tools + # - name: Clone Buildozer repository + # uses: actions/checkout@v3 + # with: + # ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} + # repository: quanta-computing/buildozer + # ref: 'new-packages-worflow' + # persist-credentials: true + # path: tools - - name: Build the PHP package - run: | - cd tools - ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r ${{ matrix.debian-version }} + # - name: Build the PHP package + # run: | + # cd tools + # ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r ${{ matrix.debian-version }} - - name: Upload packages - uses: actions/upload-artifact@v3 - with: - name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz - path: tools/debian/${{ matrix.debian-version }}/pkg/ + # - name: Upload packages + # uses: actions/upload-artifact@v3 + # with: + # name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz + # path: tools/debian/${{ matrix.debian-version }}/pkg/ centos-builds: if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') From e5a00a7c6a727d3c925de5c7d64a9de38ec07cd1 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Wed, 9 Aug 2023 17:25:51 +0200 Subject: [PATCH 40/60] build for centos 8 and php all --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 39c035e..7cfa801 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -69,7 +69,7 @@ jobs: fail-fast: false matrix: php-version: [php73, php74, php80, php81, php82, php83] - centos-version: [7] #8 + centos-version: [7, 8] steps: - name: Clone Quanta PHP Module repository From 045b6e8ddfac585d8ced7911d98f47c318716b75 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Thu, 10 Aug 2023 15:41:29 +0200 Subject: [PATCH 41/60] try centos 9 builds --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7cfa801..df5f369 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -69,7 +69,7 @@ jobs: fail-fast: false matrix: php-version: [php73, php74, php80, php81, php82, php83] - centos-version: [7, 8] + centos-version: [7, 8, 9] steps: - name: Clone Quanta PHP Module repository From 7ddab64cc39f719f3500f9e4d5c425070e3250ec Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Thu, 10 Aug 2023 16:24:28 +0200 Subject: [PATCH 42/60] rebuild every debian --- .github/workflows/main.yml | 86 +++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index df5f369..5ba5743 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,53 +23,16 @@ env: PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - # debian-builds: - # if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') - # environment: build - # name: 'Building ${{ matrix.php-version }} for Debian ${{ matrix.debian-version }}' - # runs-on: ubuntu-latest - # strategy: - # fail-fast: false - # matrix: - # php-version: [php73, php74, php80, php81, php82, php83] - # debian-version: [bookworm] - - # steps: - # - name: Clone Quanta PHP Module repository - # uses: actions/checkout@v3 - # with: - # path: php-module - - # - name: Clone Buildozer repository - # uses: actions/checkout@v3 - # with: - # ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} - # repository: quanta-computing/buildozer - # ref: 'new-packages-worflow' - # persist-credentials: true - # path: tools - - # - name: Build the PHP package - # run: | - # cd tools - # ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r ${{ matrix.debian-version }} - - # - name: Upload packages - # uses: actions/upload-artifact@v3 - # with: - # name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz - # path: tools/debian/${{ matrix.debian-version }}/pkg/ - - centos-builds: + debian-builds: if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') environment: build - name: 'Building ${{ matrix.php-version }} for CentOS ${{ matrix.centos-version }}' + name: 'Building ${{ matrix.php-version }} for Debian ${{ matrix.debian-version }}' runs-on: ubuntu-latest strategy: fail-fast: false matrix: php-version: [php73, php74, php80, php81, php82, php83] - centos-version: [7, 8, 9] + debian-version: [buster, bullseye, bookworm] steps: - name: Clone Quanta PHP Module repository @@ -89,10 +52,47 @@ jobs: - name: Build the PHP package run: | cd tools - ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -s ../php-module/extension/ -r 1.3.4 + ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r ${{ matrix.debian-version }} - name: Upload packages uses: actions/upload-artifact@v3 with: - name: centos-${{ matrix.centos-version }}-${{ matrix.php-version }}.tgz - path: tools/centos/${{ matrix.centos-version }}/pkg/ + name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz + path: tools/debian/${{ matrix.debian-version }}/pkg/ + + # centos-builds: + # if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') + # environment: build + # name: 'Building ${{ matrix.php-version }} for CentOS ${{ matrix.centos-version }}' + # runs-on: ubuntu-latest + # strategy: + # fail-fast: false + # matrix: + # php-version: [php73, php74, php80, php81, php82, php83] + # centos-version: [7, 8, 9] + + # steps: + # - name: Clone Quanta PHP Module repository + # uses: actions/checkout@v3 + # with: + # path: php-module + + # - name: Clone Buildozer repository + # uses: actions/checkout@v3 + # with: + # ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} + # repository: quanta-computing/buildozer + # ref: 'new-packages-worflow' + # persist-credentials: true + # path: tools + + # - name: Build the PHP package + # run: | + # cd tools + # ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -s ../php-module/extension/ -r 1.3.4 + + # - name: Upload packages + # uses: actions/upload-artifact@v3 + # with: + # name: centos-${{ matrix.centos-version }}-${{ matrix.php-version }}.tgz + # path: tools/centos/${{ matrix.centos-version }}/pkg/ From 11fb2a726595f78179d1a857d2f893f5f7542ad4 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Fri, 11 Aug 2023 10:13:18 +0200 Subject: [PATCH 43/60] try pelletesteuse on bullseye --- .github/workflows/main.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5ba5743..24c53c1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,7 @@ jobs: fail-fast: false matrix: php-version: [php73, php74, php80, php81, php82, php83] - debian-version: [buster, bullseye, bookworm] + debian-version: [bullseye] # [buster, bullseye, bookworm] steps: - name: Clone Quanta PHP Module repository @@ -52,7 +52,7 @@ jobs: - name: Build the PHP package run: | cd tools - ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r ${{ matrix.debian-version }} + ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r 1.3.4 - name: Upload packages uses: actions/upload-artifact@v3 @@ -60,6 +60,13 @@ jobs: name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz path: tools/debian/${{ matrix.debian-version }}/pkg/ + - name: Test packages + run: | + ln -s tools/debian/${{ matrix.debian-version }}/pkg /pkg + ./pelletesteuse -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -r 1.3.4 + cat /etc/os-release + exit + # centos-builds: # if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') # environment: build From c45d07ff5db002327e53582460560cc5409a2ea6 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Fri, 11 Aug 2023 16:11:44 +0200 Subject: [PATCH 44/60] try pelletesteuse in the workflow --- .github/workflows/main.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 24c53c1..6590398 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -54,7 +54,7 @@ jobs: cd tools ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r 1.3.4 - - name: Upload packages + - name: Upload packages as artifact uses: actions/upload-artifact@v3 with: name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz @@ -62,10 +62,8 @@ jobs: - name: Test packages run: | - ln -s tools/debian/${{ matrix.debian-version }}/pkg /pkg + cd tools ./pelletesteuse -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -r 1.3.4 - cat /etc/os-release - exit # centos-builds: # if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') From 0ce24b578c0f4765a16cf42f6817b26938bc277c Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Fri, 11 Aug 2023 16:20:31 +0200 Subject: [PATCH 45/60] remove the sleep and test again --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6590398..0fd1062 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,7 +49,7 @@ jobs: persist-credentials: true path: tools - - name: Build the PHP package + - name: Build the PHP package with Buildozer run: | cd tools ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r 1.3.4 @@ -60,7 +60,7 @@ jobs: name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz path: tools/debian/${{ matrix.debian-version }}/pkg/ - - name: Test packages + - name: Test packages with Pelletesteuse run: | cd tools ./pelletesteuse -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -r 1.3.4 From fb38f41a2f4cd51684b8c688fdcc7aca961b795c Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Fri, 11 Aug 2023 16:55:58 +0200 Subject: [PATCH 46/60] try to launch pelletesteuse again --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0fd1062..1d09345 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,7 +49,7 @@ jobs: persist-credentials: true path: tools - - name: Build the PHP package with Buildozer + - name: Buildozering run: | cd tools ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r 1.3.4 @@ -60,7 +60,7 @@ jobs: name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz path: tools/debian/${{ matrix.debian-version }}/pkg/ - - name: Test packages with Pelletesteuse + - name: Pelletesting run: | cd tools ./pelletesteuse -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -r 1.3.4 From b641f7c3b717771dc9ab5587883b813d543c721b Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Fri, 11 Aug 2023 17:01:22 +0200 Subject: [PATCH 47/60] tests for bookworm --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1d09345..ed5d630 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,7 @@ jobs: fail-fast: false matrix: php-version: [php73, php74, php80, php81, php82, php83] - debian-version: [bullseye] # [buster, bullseye, bookworm] + debian-version: [bookworm] # [buster, bullseye, bookworm] steps: - name: Clone Quanta PHP Module repository From 1b407165d136daea27159122691caf62f311c7a1 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Fri, 11 Aug 2023 17:54:09 +0200 Subject: [PATCH 48/60] test centos 8 with pelletesteuse on php7.3 only for now --- .github/workflows/main.yml | 99 ++++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 47 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ed5d630..cc8c750 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,16 +23,58 @@ env: PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - debian-builds: + # debian-builds: + # if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') + # environment: build + # name: 'Building ${{ matrix.php-version }} for Debian ${{ matrix.debian-version }}' + # runs-on: ubuntu-latest + # strategy: + # fail-fast: false + # matrix: + # php-version: [php73, php74, php80, php81, php82, php83] + # debian-version: [bookworm] # [buster, bullseye, bookworm] + + # steps: + # - name: Clone Quanta PHP Module repository + # uses: actions/checkout@v3 + # with: + # path: php-module + + # - name: Clone Buildozer repository + # uses: actions/checkout@v3 + # with: + # ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} + # repository: quanta-computing/buildozer + # ref: 'new-packages-worflow' + # persist-credentials: true + # path: tools + + # - name: Buildozering + # run: | + # cd tools + # ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r 1.3.4 + + # - name: Upload packages as artifact + # uses: actions/upload-artifact@v3 + # with: + # name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz + # path: tools/debian/${{ matrix.debian-version }}/pkg/ + + # - name: Pelletesting + # run: | + # cd tools + # ./pelletesteuse -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -r 1.3.4 + + centos-builds: if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') environment: build - name: 'Building ${{ matrix.php-version }} for Debian ${{ matrix.debian-version }}' + name: 'Building ${{ matrix.php-version }} for CentOS ${{ matrix.centos-version }}' runs-on: ubuntu-latest strategy: fail-fast: false matrix: - php-version: [php73, php74, php80, php81, php82, php83] - debian-version: [bookworm] # [buster, bullseye, bookworm] + php-version: [php73] + centos-version: [8] steps: - name: Clone Quanta PHP Module repository @@ -49,55 +91,18 @@ jobs: persist-credentials: true path: tools - - name: Buildozering + - name: Build the PHP package run: | cd tools - ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r 1.3.4 + ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -s ../php-module/extension/ -r 1.3.4 - - name: Upload packages as artifact + - name: Upload packages uses: actions/upload-artifact@v3 with: - name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz - path: tools/debian/${{ matrix.debian-version }}/pkg/ + name: centos-${{ matrix.centos-version }}-${{ matrix.php-version }}.tgz + path: tools/centos/${{ matrix.centos-version }}/pkg/ - name: Pelletesting run: | cd tools - ./pelletesteuse -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -r 1.3.4 - - # centos-builds: - # if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') - # environment: build - # name: 'Building ${{ matrix.php-version }} for CentOS ${{ matrix.centos-version }}' - # runs-on: ubuntu-latest - # strategy: - # fail-fast: false - # matrix: - # php-version: [php73, php74, php80, php81, php82, php83] - # centos-version: [7, 8, 9] - - # steps: - # - name: Clone Quanta PHP Module repository - # uses: actions/checkout@v3 - # with: - # path: php-module - - # - name: Clone Buildozer repository - # uses: actions/checkout@v3 - # with: - # ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} - # repository: quanta-computing/buildozer - # ref: 'new-packages-worflow' - # persist-credentials: true - # path: tools - - # - name: Build the PHP package - # run: | - # cd tools - # ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -s ../php-module/extension/ -r 1.3.4 - - # - name: Upload packages - # uses: actions/upload-artifact@v3 - # with: - # name: centos-${{ matrix.centos-version }}-${{ matrix.php-version }}.tgz - # path: tools/centos/${{ matrix.centos-version }}/pkg/ + ./pelletesteuse -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -r 1.3.4 From da1f0fd96830c1663e04f2df084d0ed33cd7492c Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Fri, 11 Aug 2023 18:05:24 +0200 Subject: [PATCH 49/60] try 8,3 for debian --- .github/workflows/main.yml | 86 +++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cc8c750..cb9bcef 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,47 +23,47 @@ env: PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - # debian-builds: - # if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') - # environment: build - # name: 'Building ${{ matrix.php-version }} for Debian ${{ matrix.debian-version }}' - # runs-on: ubuntu-latest - # strategy: - # fail-fast: false - # matrix: - # php-version: [php73, php74, php80, php81, php82, php83] - # debian-version: [bookworm] # [buster, bullseye, bookworm] - - # steps: - # - name: Clone Quanta PHP Module repository - # uses: actions/checkout@v3 - # with: - # path: php-module - - # - name: Clone Buildozer repository - # uses: actions/checkout@v3 - # with: - # ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} - # repository: quanta-computing/buildozer - # ref: 'new-packages-worflow' - # persist-credentials: true - # path: tools - - # - name: Buildozering - # run: | - # cd tools - # ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r 1.3.4 - - # - name: Upload packages as artifact - # uses: actions/upload-artifact@v3 - # with: - # name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz - # path: tools/debian/${{ matrix.debian-version }}/pkg/ - - # - name: Pelletesting - # run: | - # cd tools - # ./pelletesteuse -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -r 1.3.4 + debian-builds: + if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') + environment: build + name: 'Building ${{ matrix.php-version }} for Debian ${{ matrix.debian-version }}' + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php-version: [php83] # php73, php74, php80, php81, php82, php83 + debian-version: [bullseye, bookworm] # [buster, bullseye, bookworm] + + steps: + - name: Clone Quanta PHP Module repository + uses: actions/checkout@v3 + with: + path: php-module + + - name: Clone Buildozer repository + uses: actions/checkout@v3 + with: + ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} + repository: quanta-computing/buildozer + ref: 'new-packages-worflow' + persist-credentials: true + path: tools + + - name: Buildozering + run: | + cd tools + ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r 1.3.4 + + - name: Upload packages as artifact + uses: actions/upload-artifact@v3 + with: + name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz + path: tools/debian/${{ matrix.debian-version }}/pkg/ + + - name: Pelletesting + run: | + cd tools + ./pelletesteuse -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -r 1.3.4 centos-builds: if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') @@ -73,8 +73,8 @@ jobs: strategy: fail-fast: false matrix: - php-version: [php73] - centos-version: [8] + php-version: [php73] # php73, php74, php80, php81, php82, php83 + centos-version: [8] # 7, 8, 9 steps: - name: Clone Quanta PHP Module repository From 32255d6f5d00a5c732817ef1791fc0506fe349e0 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Mon, 21 Aug 2023 15:19:51 +0200 Subject: [PATCH 50/60] try to pelletest the buster php versions --- .github/workflows/main.yml | 86 +++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cb9bcef..655ed85 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,8 +31,8 @@ jobs: strategy: fail-fast: false matrix: - php-version: [php83] # php73, php74, php80, php81, php82, php83 - debian-version: [bullseye, bookworm] # [buster, bullseye, bookworm] + php-version: [php73, php74, php80, php81, php82, php83] + debian-version: [buster] # [buster, bullseye, bookworm] steps: - name: Clone Quanta PHP Module repository @@ -65,44 +65,44 @@ jobs: cd tools ./pelletesteuse -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -r 1.3.4 - centos-builds: - if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') - environment: build - name: 'Building ${{ matrix.php-version }} for CentOS ${{ matrix.centos-version }}' - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php-version: [php73] # php73, php74, php80, php81, php82, php83 - centos-version: [8] # 7, 8, 9 - - steps: - - name: Clone Quanta PHP Module repository - uses: actions/checkout@v3 - with: - path: php-module - - - name: Clone Buildozer repository - uses: actions/checkout@v3 - with: - ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} - repository: quanta-computing/buildozer - ref: 'new-packages-worflow' - persist-credentials: true - path: tools - - - name: Build the PHP package - run: | - cd tools - ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -s ../php-module/extension/ -r 1.3.4 - - - name: Upload packages - uses: actions/upload-artifact@v3 - with: - name: centos-${{ matrix.centos-version }}-${{ matrix.php-version }}.tgz - path: tools/centos/${{ matrix.centos-version }}/pkg/ - - - name: Pelletesting - run: | - cd tools - ./pelletesteuse -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -r 1.3.4 + # centos-builds: + # if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') + # environment: build + # name: 'Building ${{ matrix.php-version }} for CentOS ${{ matrix.centos-version }}' + # runs-on: ubuntu-latest + # strategy: + # fail-fast: false + # matrix: + # php-version: [php73] # php73, php74, php80, php81, php82, php83 + # centos-version: [8] # 7, 8, 9 + + # steps: + # - name: Clone Quanta PHP Module repository + # uses: actions/checkout@v3 + # with: + # path: php-module + + # - name: Clone Buildozer repository + # uses: actions/checkout@v3 + # with: + # ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} + # repository: quanta-computing/buildozer + # ref: 'new-packages-worflow' + # persist-credentials: true + # path: tools + + # - name: Build the PHP package + # run: | + # cd tools + # ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -s ../php-module/extension/ -r 1.3.4 + + # - name: Upload packages + # uses: actions/upload-artifact@v3 + # with: + # name: centos-${{ matrix.centos-version }}-${{ matrix.php-version }}.tgz + # path: tools/centos/${{ matrix.centos-version }}/pkg/ + + # - name: Pelletesting + # run: | + # cd tools + # ./pelletesteuse -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -r 1.3.4 From 358158d0322cf3ea7bea92d1f9c580e51cc5bde3 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Tue, 22 Aug 2023 16:15:24 +0200 Subject: [PATCH 51/60] test centos 8 on workflow --- .github/workflows/main.yml | 104 ++++++++++++++++++------------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 655ed85..bb22834 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,58 +23,16 @@ env: PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - debian-builds: - if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') - environment: build - name: 'Building ${{ matrix.php-version }} for Debian ${{ matrix.debian-version }}' - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php-version: [php73, php74, php80, php81, php82, php83] - debian-version: [buster] # [buster, bullseye, bookworm] - - steps: - - name: Clone Quanta PHP Module repository - uses: actions/checkout@v3 - with: - path: php-module - - - name: Clone Buildozer repository - uses: actions/checkout@v3 - with: - ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} - repository: quanta-computing/buildozer - ref: 'new-packages-worflow' - persist-credentials: true - path: tools - - - name: Buildozering - run: | - cd tools - ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r 1.3.4 - - - name: Upload packages as artifact - uses: actions/upload-artifact@v3 - with: - name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz - path: tools/debian/${{ matrix.debian-version }}/pkg/ - - - name: Pelletesting - run: | - cd tools - ./pelletesteuse -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -r 1.3.4 - - # centos-builds: + # debian-builds: # if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') # environment: build - # name: 'Building ${{ matrix.php-version }} for CentOS ${{ matrix.centos-version }}' + # name: 'Building ${{ matrix.php-version }} for Debian ${{ matrix.debian-version }}' # runs-on: ubuntu-latest # strategy: # fail-fast: false # matrix: - # php-version: [php73] # php73, php74, php80, php81, php82, php83 - # centos-version: [8] # 7, 8, 9 + # php-version: [php73, php74, php80, php81, php82, php83] + # debian-version: [buster] # [buster, bullseye, bookworm] # steps: # - name: Clone Quanta PHP Module repository @@ -91,18 +49,60 @@ jobs: # persist-credentials: true # path: tools - # - name: Build the PHP package + # - name: Buildozering # run: | # cd tools - # ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -s ../php-module/extension/ -r 1.3.4 + # ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r 1.3.4 - # - name: Upload packages + # - name: Upload packages as artifact # uses: actions/upload-artifact@v3 # with: - # name: centos-${{ matrix.centos-version }}-${{ matrix.php-version }}.tgz - # path: tools/centos/${{ matrix.centos-version }}/pkg/ + # name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz + # path: tools/debian/${{ matrix.debian-version }}/pkg/ # - name: Pelletesting # run: | # cd tools - # ./pelletesteuse -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -r 1.3.4 + # ./pelletesteuse -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -r 1.3.4 + + centos-builds: + if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') + environment: build + name: 'Building ${{ matrix.php-version }} for CentOS ${{ matrix.centos-version }}' + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php-version: [php73, php74, php80, php81-remi] # php73, php74, php80, php81, php82, php83 + centos-version: [8] # 7, 8, 9 + + steps: + - name: Clone Quanta PHP Module repository + uses: actions/checkout@v3 + with: + path: php-module + + - name: Clone Buildozer repository + uses: actions/checkout@v3 + with: + ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} + repository: quanta-computing/buildozer + ref: 'new-packages-worflow' + persist-credentials: true + path: tools + + - name: Build the PHP package + run: | + cd tools + ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -s ../php-module/extension/ -r 1.3.4 + + - name: Upload packages + uses: actions/upload-artifact@v3 + with: + name: centos-${{ matrix.centos-version }}-${{ matrix.php-version }}.tgz + path: tools/centos/${{ matrix.centos-version }}/pkg/ + + - name: Pelletesting + run: | + cd tools + ./pelletesteuse -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -r 1.3.4 From a6549bc7d706bd25bc86ed42bb19ba009894c8bc Mon Sep 17 00:00:00 2001 From: Matthieu Rosinski Date: Fri, 25 Aug 2023 10:55:05 +0200 Subject: [PATCH 52/60] cleanup --- packager/build_deb.sh | 24 -- packager/build_package.sh | 31 -- packager/centos6-php53.dockerfile | 25 -- packager/centos6-php54.dockerfile | 28 -- packager/centos6-php55.dockerfile | 25 -- packager/centos6-php56.dockerfile | 27 -- packager/centos6-php70-remi.dockerfile | 25 -- packager/centos6/build_package.sh | 32 -- .../php53-quanta-mon/php53-quanta-mon.spec | 39 -- .../php54-quanta-mon/php54-quanta-mon.spec | 39 -- .../php55-quanta-mon/php55-quanta-mon.spec | 39 -- .../php56-quanta-mon/php56-quanta-mon.spec | 39 -- .../php70-remi-quanta-mon.spec | 41 --- packager/centos7-php54.dockerfile | 22 -- packager/centos7-php55.dockerfile | 26 -- packager/centos7-php56.dockerfile | 26 -- packager/centos7-php70.dockerfile | 26 -- packager/centos7-php71-remi.dockerfile | 27 -- packager/centos7-php71-remiphp71.dockerfile | 28 -- packager/centos7-php71.dockerfile | 26 -- packager/centos7/build_package.sh | 32 -- .../php54-quanta-mon/php54-quanta-mon.spec | 39 -- .../php55-quanta-mon/php55-quanta-mon.spec | 39 -- .../php56-quanta-mon/php56-quanta-mon.spec | 39 -- .../php70-quanta-mon/php70-quanta-mon.spec | 39 -- .../php71-quanta-mon/php71-quanta-mon.spec | 39 -- .../php71-remi-quanta-mon.spec | 40 -- .../php71-remiphp71-quanta-mon.spec | 40 -- packager/debian6-php53.dockerfile | 47 --- packager/debian6-php54.dockerfile | 36 -- packager/debian6/build_package.sh | 33 -- .../debian6/php53-quanta-mon/debian/changelog | 11 - .../debian6/php53-quanta-mon/debian/compat | 1 - .../debian6/php53-quanta-mon/debian/control | 16 - .../debian6/php53-quanta-mon/debian/copyright | 348 ------------------ .../debian6/php53-quanta-mon/debian/rules | 15 - .../php53-quanta-mon/debian/source/format | 1 - .../debian6/php54-quanta-mon/debian/changelog | 11 - .../debian6/php54-quanta-mon/debian/compat | 1 - .../debian6/php54-quanta-mon/debian/control | 16 - .../debian6/php54-quanta-mon/debian/copyright | 348 ------------------ .../debian6/php54-quanta-mon/debian/rules | 15 - .../php54-quanta-mon/debian/source/format | 1 - packager/debian7-php54.dockerfile | 45 --- packager/debian7-php55.dockerfile | 47 --- packager/debian7-php56.dockerfile | 47 --- packager/debian7/build_package.sh | 33 -- packager/debian7/dput.cf | 22 -- .../debian7/php54-quanta-mon/debian/changelog | 11 - .../debian7/php54-quanta-mon/debian/compat | 1 - .../debian7/php54-quanta-mon/debian/control | 16 - .../debian7/php54-quanta-mon/debian/copyright | 348 ------------------ .../debian7/php54-quanta-mon/debian/rules | 15 - .../php54-quanta-mon/debian/source/format | 1 - .../debian7/php55-quanta-mon/debian/changelog | 11 - .../debian7/php55-quanta-mon/debian/compat | 1 - .../debian7/php55-quanta-mon/debian/control | 16 - .../debian7/php55-quanta-mon/debian/copyright | 348 ------------------ .../debian7/php55-quanta-mon/debian/rules | 15 - .../php55-quanta-mon/debian/source/format | 1 - .../debian7/php56-quanta-mon/debian/changelog | 11 - .../debian7/php56-quanta-mon/debian/compat | 1 - .../debian7/php56-quanta-mon/debian/control | 16 - .../debian7/php56-quanta-mon/debian/copyright | 348 ------------------ .../debian7/php56-quanta-mon/debian/rules | 15 - .../php56-quanta-mon/debian/source/format | 1 - packager/debian8-php70.dockerfile | 54 --- packager/debian8-php71.dockerfile | 57 --- packager/debian8/build_package.sh | 30 -- packager/debian8/dput.cf | 22 -- .../debian8/php70-quanta-mon/debian/changelog | 17 - .../debian8/php70-quanta-mon/debian/compat | 1 - .../debian8/php70-quanta-mon/debian/control | 16 - .../debian8/php70-quanta-mon/debian/copyright | 348 ------------------ .../debian8/php70-quanta-mon/debian/rules | 15 - .../php70-quanta-mon/debian/source/format | 1 - .../debian8/php71-quanta-mon/debian/changelog | 5 - .../debian8/php71-quanta-mon/debian/compat | 1 - .../debian8/php71-quanta-mon/debian/control | 16 - .../debian8/php71-quanta-mon/debian/copyright | 348 ------------------ .../debian8/php71-quanta-mon/debian/rules | 15 - .../php71-quanta-mon/debian/source/format | 1 - packager/shell.sh | 28 -- qa/config.yml | 45 --- qa/dockerunner/__init__.py | 0 qa/dockerunner/__main__.py | 59 --- qa/dockerunner/builder/__init__.py | 2 - qa/dockerunner/builder/build.py | 82 ----- qa/dockerunner/builder/builder.py | 83 ----- qa/dockerunner/config/__init__.py | 1 - qa/dockerunner/config/config.py | 9 - qa/dockerunner/runner/__init__.py | 1 - qa/dockerunner/runner/runner.py | 47 --- qa/dockerunner/spec/__init__.py | 2 - qa/dockerunner/spec/spec.py | 38 -- qa/dockerunner/spec/suite.py | 56 --- qa/requirements.txt | 6 - qa/specs/test/test.sh | 5 - qa/specs/toto/test2.py | 19 - qa/templates/Dockerfile.tpl | 15 - qa/templates/local.xml.tpl | 66 ---- 101 files changed, 4683 deletions(-) delete mode 100755 packager/build_deb.sh delete mode 100755 packager/build_package.sh delete mode 100644 packager/centos6-php53.dockerfile delete mode 100644 packager/centos6-php54.dockerfile delete mode 100644 packager/centos6-php55.dockerfile delete mode 100644 packager/centos6-php56.dockerfile delete mode 100644 packager/centos6-php70-remi.dockerfile delete mode 100755 packager/centos6/build_package.sh delete mode 100644 packager/centos6/php53-quanta-mon/php53-quanta-mon.spec delete mode 100644 packager/centos6/php54-quanta-mon/php54-quanta-mon.spec delete mode 100644 packager/centos6/php55-quanta-mon/php55-quanta-mon.spec delete mode 100644 packager/centos6/php56-quanta-mon/php56-quanta-mon.spec delete mode 100644 packager/centos6/php70-remi-quanta-mon/php70-remi-quanta-mon.spec delete mode 100644 packager/centos7-php54.dockerfile delete mode 100644 packager/centos7-php55.dockerfile delete mode 100644 packager/centos7-php56.dockerfile delete mode 100644 packager/centos7-php70.dockerfile delete mode 100644 packager/centos7-php71-remi.dockerfile delete mode 100644 packager/centos7-php71-remiphp71.dockerfile delete mode 100644 packager/centos7-php71.dockerfile delete mode 100755 packager/centos7/build_package.sh delete mode 100644 packager/centos7/php54-quanta-mon/php54-quanta-mon.spec delete mode 100644 packager/centos7/php55-quanta-mon/php55-quanta-mon.spec delete mode 100644 packager/centos7/php56-quanta-mon/php56-quanta-mon.spec delete mode 100644 packager/centos7/php70-quanta-mon/php70-quanta-mon.spec delete mode 100644 packager/centos7/php71-quanta-mon/php71-quanta-mon.spec delete mode 100644 packager/centos7/php71-remi-quanta-mon/php71-remi-quanta-mon.spec delete mode 100644 packager/centos7/php71-remiphp71-quanta-mon/php71-remiphp71-quanta-mon.spec delete mode 100644 packager/debian6-php53.dockerfile delete mode 100644 packager/debian6-php54.dockerfile delete mode 100755 packager/debian6/build_package.sh delete mode 100644 packager/debian6/php53-quanta-mon/debian/changelog delete mode 100644 packager/debian6/php53-quanta-mon/debian/compat delete mode 100644 packager/debian6/php53-quanta-mon/debian/control delete mode 100644 packager/debian6/php53-quanta-mon/debian/copyright delete mode 100644 packager/debian6/php53-quanta-mon/debian/rules delete mode 100644 packager/debian6/php53-quanta-mon/debian/source/format delete mode 100644 packager/debian6/php54-quanta-mon/debian/changelog delete mode 100644 packager/debian6/php54-quanta-mon/debian/compat delete mode 100644 packager/debian6/php54-quanta-mon/debian/control delete mode 100644 packager/debian6/php54-quanta-mon/debian/copyright delete mode 100644 packager/debian6/php54-quanta-mon/debian/rules delete mode 100644 packager/debian6/php54-quanta-mon/debian/source/format delete mode 100644 packager/debian7-php54.dockerfile delete mode 100644 packager/debian7-php55.dockerfile delete mode 100644 packager/debian7-php56.dockerfile delete mode 100755 packager/debian7/build_package.sh delete mode 100644 packager/debian7/dput.cf delete mode 100644 packager/debian7/php54-quanta-mon/debian/changelog delete mode 100644 packager/debian7/php54-quanta-mon/debian/compat delete mode 100644 packager/debian7/php54-quanta-mon/debian/control delete mode 100644 packager/debian7/php54-quanta-mon/debian/copyright delete mode 100644 packager/debian7/php54-quanta-mon/debian/rules delete mode 100644 packager/debian7/php54-quanta-mon/debian/source/format delete mode 100644 packager/debian7/php55-quanta-mon/debian/changelog delete mode 100644 packager/debian7/php55-quanta-mon/debian/compat delete mode 100644 packager/debian7/php55-quanta-mon/debian/control delete mode 100644 packager/debian7/php55-quanta-mon/debian/copyright delete mode 100644 packager/debian7/php55-quanta-mon/debian/rules delete mode 100644 packager/debian7/php55-quanta-mon/debian/source/format delete mode 100644 packager/debian7/php56-quanta-mon/debian/changelog delete mode 100644 packager/debian7/php56-quanta-mon/debian/compat delete mode 100644 packager/debian7/php56-quanta-mon/debian/control delete mode 100644 packager/debian7/php56-quanta-mon/debian/copyright delete mode 100644 packager/debian7/php56-quanta-mon/debian/rules delete mode 100644 packager/debian7/php56-quanta-mon/debian/source/format delete mode 100644 packager/debian8-php70.dockerfile delete mode 100644 packager/debian8-php71.dockerfile delete mode 100755 packager/debian8/build_package.sh delete mode 100644 packager/debian8/dput.cf delete mode 100644 packager/debian8/php70-quanta-mon/debian/changelog delete mode 100644 packager/debian8/php70-quanta-mon/debian/compat delete mode 100644 packager/debian8/php70-quanta-mon/debian/control delete mode 100644 packager/debian8/php70-quanta-mon/debian/copyright delete mode 100755 packager/debian8/php70-quanta-mon/debian/rules delete mode 100644 packager/debian8/php70-quanta-mon/debian/source/format delete mode 100644 packager/debian8/php71-quanta-mon/debian/changelog delete mode 100644 packager/debian8/php71-quanta-mon/debian/compat delete mode 100644 packager/debian8/php71-quanta-mon/debian/control delete mode 100644 packager/debian8/php71-quanta-mon/debian/copyright delete mode 100644 packager/debian8/php71-quanta-mon/debian/rules delete mode 100644 packager/debian8/php71-quanta-mon/debian/source/format delete mode 100755 packager/shell.sh delete mode 100644 qa/config.yml delete mode 100644 qa/dockerunner/__init__.py delete mode 100644 qa/dockerunner/__main__.py delete mode 100644 qa/dockerunner/builder/__init__.py delete mode 100644 qa/dockerunner/builder/build.py delete mode 100644 qa/dockerunner/builder/builder.py delete mode 100644 qa/dockerunner/config/__init__.py delete mode 100644 qa/dockerunner/config/config.py delete mode 100644 qa/dockerunner/runner/__init__.py delete mode 100644 qa/dockerunner/runner/runner.py delete mode 100644 qa/dockerunner/spec/__init__.py delete mode 100644 qa/dockerunner/spec/spec.py delete mode 100644 qa/dockerunner/spec/suite.py delete mode 100644 qa/requirements.txt delete mode 100755 qa/specs/test/test.sh delete mode 100755 qa/specs/toto/test2.py delete mode 100644 qa/templates/Dockerfile.tpl delete mode 100644 qa/templates/local.xml.tpl diff --git a/packager/build_deb.sh b/packager/build_deb.sh deleted file mode 100755 index 2e959aa..0000000 --- a/packager/build_deb.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -localdir=`git rev-parse --show-toplevel` -packagerdir=${localdir}/packager - -echo "BUILDING PACKAGES" -for dir in `find ${packagerdir} -type d -name 'debian?'`; do - for subdir in `find $dir -type d -name 'php*' -depth 1`; do - package=`echo $subdir | sed -E 's/.*packager\/(debian.)\/(php.*)-quanta-mon/\1;\2/'` - os=`echo $package | cut -d ';' -f 1` - ver=`echo $package | cut -d ';' -f 2` - ${packagerdir}/build_package.sh $os $ver - done -done - - -mkdir -p ${packagerdir}/pkg_debian - -echo "COLLECT .so" -for file in `find ${packagerdir}/debian? -type f -wholename '*/usr/lib/php*/*/quanta_mon.so'`; do - echo $file - dst=`echo $file | sed -E 's/.*packager\/(debian.)\/.*\/([0-9]+)\/quanta_mon.so$/\1-\2.so/'` - cp -v $file ${packagerdir}/pkg_debian/$dst -done diff --git a/packager/build_package.sh b/packager/build_package.sh deleted file mode 100755 index 5ffce33..0000000 --- a/packager/build_package.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -ostype=$1 -version=$2 -localdir=`git rev-parse --show-toplevel` -dockerfile=${localdir}/packager/${ostype}-${version}.dockerfile - -if [ -z "$ostype" ] || [ -z "$version" ]; then - echo "Usage: ./build_package.sh " - exit 1 -fi - -echo "======>>> Started building package for ${ostype}/${version}..." -if [ ! -f $dockerfile ]; then - echo "ERROR: Wrong os or version, ${dockerfile} does not exists" - exit 1 -fi - -echo "======>>> Building Docker image..." -image=`cat ${dockerfile} | docker build -q - | cut -d ':' -f 2` -ret=$? -if [ ! $ret -eq 0 ] || [ -z "$image" ] ; then - echo "ERROR: Failed to build docker image, exiting..." - exit 1 -fi - -echo "======>>> Running the packaging script" -docker run -i -v ${localdir}:/php-module ${image} \ - /php-module/packager/${ostype}/build_package.sh ${version}-quanta-mon - -echo "======>>> Sucessfully built package for ${ostype}/${version}!" diff --git a/packager/centos6-php53.dockerfile b/packager/centos6-php53.dockerfile deleted file mode 100644 index 67cd93e..0000000 --- a/packager/centos6-php53.dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM centos:centos6 -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN curl -s https://www.quanta-monitoring.com/quanta-centos-repo.txt -o /etc/yum.repos.d/quanta.repo -RUN curl -s https://www.quanta-monitoring.com/quanta-repo-key.gpg -o /tmp/quanta.key \ - && rpm --import /tmp/quanta.key \ - && /bin/rm -f /tmp/quanta.key -RUN sed -i'' -e 's/rpm\.quanta\.gr\/quanta/rpm.quanta.gr\/quanta-el6/g' /etc/yum.repos.d/quanta.repo - -RUN yum makecache fast - -RUN yum -q -y groupinstall "Development tools" - -RUN yum -q -y install \ - quanta-agent \ - php \ - php-devel \ - php-gd \ - php-mbstring \ - libmonikor-devel \ - libcurl-devel \ - rpm-build \ - rpmdevtools - -RUN rpmdev-setuptree diff --git a/packager/centos6-php54.dockerfile b/packager/centos6-php54.dockerfile deleted file mode 100644 index 2377133..0000000 --- a/packager/centos6-php54.dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -FROM centos:centos6 -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN curl -s https://www.quanta-monitoring.com/quanta-centos-repo.txt -o /etc/yum.repos.d/quanta.repo -RUN curl -s https://www.quanta-monitoring.com/quanta-repo-key.gpg -o /tmp/quanta.key \ - && rpm --import /tmp/quanta.key \ - && /bin/rm -f /tmp/quanta.key -RUN sed -i'' -e 's/rpm\.quanta\.gr\/quanta/rpm.quanta.gr\/quanta-el6/g' /etc/yum.repos.d/quanta.repo -RUN yum -q -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm -RUN yum -q -y install http://archive.webtatic.com/yum/el6-archive/x86_64/webtatic-release-6-5.noarch.rpm - -RUN yum makecache fast - -RUN yum -q -y groupinstall "Development tools" - -RUN sed -i'' -e 's/enabled=0/enabled=1/' /etc/yum.repos.d/webtatic-archive.repo -RUN yum makecache fast - -RUN yum -q -y install \ - quanta-agent \ - php54w \ - php54w-devel \ - libmonikor-devel \ - libcurl-devel \ - rpm-build \ - rpmdevtools - -RUN rpmdev-setuptree diff --git a/packager/centos6-php55.dockerfile b/packager/centos6-php55.dockerfile deleted file mode 100644 index dbd1884..0000000 --- a/packager/centos6-php55.dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM centos:centos6 -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN curl -s https://www.quanta-monitoring.com/quanta-centos-repo.txt -o /etc/yum.repos.d/quanta.repo -RUN curl -s https://www.quanta-monitoring.com/quanta-repo-key.gpg -o /tmp/quanta.key \ - && rpm --import /tmp/quanta.key \ - && /bin/rm -f /tmp/quanta.key -RUN sed -i'' -e 's/rpm\.quanta\.gr\/quanta/rpm.quanta.gr\/quanta-el6/g' /etc/yum.repos.d/quanta.repo -RUN yum -q -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm -RUN yum -q -y install http://mirror.webtatic.com/yum/el6/latest.rpm - -RUN yum makecache fast - -RUN yum -q -y groupinstall "Development tools" - -RUN yum -q -y install \ - quanta-agent \ - php55w \ - php55w-devel \ - libmonikor-devel \ - libcurl-devel \ - rpm-build \ - rpmdevtools - -RUN rpmdev-setuptree diff --git a/packager/centos6-php56.dockerfile b/packager/centos6-php56.dockerfile deleted file mode 100644 index 4cc3585..0000000 --- a/packager/centos6-php56.dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM centos:centos6 -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN curl -s https://www.quanta-monitoring.com/quanta-centos-repo.txt -o /etc/yum.repos.d/quanta.repo -RUN curl -s https://www.quanta-monitoring.com/quanta-repo-key.gpg -o /tmp/quanta.key \ - && rpm --import /tmp/quanta.key \ - && /bin/rm -f /tmp/quanta.key -RUN sed -i'' -e 's/rpm\.quanta\.gr\/quanta/rpm.quanta.gr\/quanta-el6/g' /etc/yum.repos.d/quanta.repo -RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm -RUN rpm -Uvh https://centos6.iuscommunity.org/ius-release.rpm - -RUN yum makecache fast - -RUN yum -q -y groupinstall "Development tools" - -RUN yum -q -y install \ - quanta-agent \ - php56u \ - php56u-devel \ - php56u-gd \ - php56u-mbstring \ - libmonikor-devel \ - libcurl-devel \ - rpm-build \ - rpmdevtools - -RUN rpmdev-setuptree diff --git a/packager/centos6-php70-remi.dockerfile b/packager/centos6-php70-remi.dockerfile deleted file mode 100644 index 8271e16..0000000 --- a/packager/centos6-php70-remi.dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM centos:centos6 -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN curl -s https://www.quanta-monitoring.com/quanta-centos-repo.txt -o /etc/yum.repos.d/quanta.repo -RUN curl -s https://www.quanta-monitoring.com/quanta-repo-key.gpg -o /tmp/quanta.key \ - && rpm --import /tmp/quanta.key \ - && /bin/rm -f /tmp/quanta.key -RUN sed -i'' -e 's/rpm\.quanta\.gr\/quanta/rpm.quanta.gr\/quanta-el6/g' /etc/yum.repos.d/quanta.repo -RUN yum -q -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm -RUN yum -q -y install http://rpms.remirepo.net/enterprise/remi-release-6.rpm - -RUN yum makecache fast - -RUN yum -q -y groupinstall "Development tools" - -RUN yum -q -y install \ - quanta-agent \ - php70 \ - php70-php-devel \ - libmonikor-devel \ - libcurl-devel \ - rpm-build \ - rpmdevtools - -RUN rpmdev-setuptree diff --git a/packager/centos6/build_package.sh b/packager/centos6/build_package.sh deleted file mode 100755 index a0a2372..0000000 --- a/packager/centos6/build_package.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -set -e - -package=$1 -basedir=/php-module -packagerdir=/php-module/packager/centos6 - -if [ -z "$package" ]; then - echo "Usage: build_package.sh " - exit 1 -fi - -echo "Creating build directory..." -rm -Rf ${packagerdir}/${package}/build -mkdir ${packagerdir}/${package}/build -cp -r ${basedir}/extension ${packagerdir}/${package}/build/${package} -cd ${packagerdir}/${package}/build -cp ${packagerdir}/${package}/${package}.spec /root/rpmbuild/SPECS/${package}.spec -tar czf ${package}.tgz ${package} -mv ${package}.tgz /root/rpmbuild/SOURCES/${package}.tgz - -echo "Cleaning up output dir..." -rm -Rf /root/rpmbuild/RPMS/x86_64/* - -echo "Building package..." -rpmbuild -ba /root/rpmbuild/SPECS/${package}.spec -cp /root/rpmbuild/RPMS/x86_64/* ${packagerdir}/${package}/build - -echo "Testing package..." -rpm -Uvh /root/rpmbuild/RPMS/x86_64/*.rpm -php -i | grep quanta diff --git a/packager/centos6/php53-quanta-mon/php53-quanta-mon.spec b/packager/centos6/php53-quanta-mon/php53-quanta-mon.spec deleted file mode 100644 index 50d9433..0000000 --- a/packager/centos6/php53-quanta-mon/php53-quanta-mon.spec +++ /dev/null @@ -1,39 +0,0 @@ -Name: php53-quanta-mon -Version: 1.2.1 -Release: 1%{?dist} -Summary: This package provides a PHP profiling module built for Magento. -Distribution: Quanta -Vendor: Quanta-Computing -Packager: Matthieu ROSINSKI -Group: Applications/Internet -URL: http://www.quanta-computing.com -License: toto -Source: php53-quanta-mon.tgz - -Buildroot : %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: php-devel -Requires: php(zend-abi) = %{php_zend_api} -Requires: php(api) = %{php_core_api} -Requires: libmonikor-devel >= 1.0.0 - -%description -This package contains a PHP extension to allow profiling for Quanta probes. - -%prep -%setup -n php53-quanta-mon - -%build -phpize -%configure - -%install -make clean all -mkdir -p %{buildroot}/etc/php.d/ -mkdir -p %{buildroot}/usr/lib64/php/modules -install -m 644 quanta_mon.ini %{buildroot}/etc/php.d/quanta_mon.ini -install -m 755 modules/quanta_mon.so %{buildroot}/usr/lib64/php/modules/quanta_mon.so - -%files -/usr/lib64/php/modules/quanta_mon.so -/etc/php.d/quanta_mon.ini diff --git a/packager/centos6/php54-quanta-mon/php54-quanta-mon.spec b/packager/centos6/php54-quanta-mon/php54-quanta-mon.spec deleted file mode 100644 index a0e598d..0000000 --- a/packager/centos6/php54-quanta-mon/php54-quanta-mon.spec +++ /dev/null @@ -1,39 +0,0 @@ -Name: php54-quanta-mon -Version: 1.2.1 -Release: 1%{?dist} -Summary: This package provides a PHP profiling module built for Magento. -Distribution: Quanta -Vendor: Quanta-Computing -Packager: Matthieu ROSINSKI -Group: Applications/Internet -URL: http://www.quanta-computing.com -License: toto -Source: php54-quanta-mon.tgz - -Buildroot : %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: php-devel -Requires: php(zend-abi) = %{php_zend_api} -Requires: php(api) = %{php_core_api} -Requires: libmonikor-devel >= 1.0.0 - -%description -This package contains a PHP extension to allow profiling for Quanta probes. - -%prep -%setup -n php54-quanta-mon - -%build -phpize -%configure - -%install -make clean all -mkdir -p %{buildroot}/etc/php.d/ -mkdir -p %{buildroot}/usr/lib64/php/modules -install -m 644 quanta_mon.ini %{buildroot}/etc/php.d/quanta_mon.ini -install -m 755 modules/quanta_mon.so %{buildroot}/usr/lib64/php/modules/quanta_mon.so - -%files -/usr/lib64/php/modules/quanta_mon.so -/etc/php.d/quanta_mon.ini diff --git a/packager/centos6/php55-quanta-mon/php55-quanta-mon.spec b/packager/centos6/php55-quanta-mon/php55-quanta-mon.spec deleted file mode 100644 index 427184c..0000000 --- a/packager/centos6/php55-quanta-mon/php55-quanta-mon.spec +++ /dev/null @@ -1,39 +0,0 @@ -Name: php55-quanta-mon -Version: 1.3.0-beta -Release: 1%{?dist} -Summary: This package provides a PHP profiling module built for Magento. -Distribution: Quanta -Vendor: Quanta-Computing -Packager: Matthieu ROSINSKI -Group: Applications/Internet -URL: http://www.quanta-computing.com -License: toto -Source: php55-quanta-mon.tgz - -Buildroot : %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: php-devel -Requires: php(zend-abi) = %{php_zend_api} -Requires: php(api) = %{php_core_api} -Requires: libmonikor-devel >= 1.0.0 - -%description -This package contains a PHP extension to allow profiling for Quanta probes. - -%prep -%setup -n php55-quanta-mon - -%build -phpize -%configure - -%install -make clean all -mkdir -p %{buildroot}/etc/php.d/ -mkdir -p %{buildroot}/usr/lib64/php/modules -install -m 644 quanta_mon.ini %{buildroot}/etc/php.d/quanta_mon.ini -install -m 755 modules/quanta_mon.so %{buildroot}/usr/lib64/php/modules/quanta_mon.so - -%files -/usr/lib64/php/modules/quanta_mon.so -/etc/php.d/quanta_mon.ini diff --git a/packager/centos6/php56-quanta-mon/php56-quanta-mon.spec b/packager/centos6/php56-quanta-mon/php56-quanta-mon.spec deleted file mode 100644 index f3462c4..0000000 --- a/packager/centos6/php56-quanta-mon/php56-quanta-mon.spec +++ /dev/null @@ -1,39 +0,0 @@ -Name: php56-quanta-mon -Version: 1.3.0-beta -Release: 1%{?dist} -Summary: This package provides a PHP profiling module built for Magento. -Distribution: Quanta -Vendor: Quanta-Computing -Packager: Matthieu ROSINSKI -Group: Applications/Internet -URL: http://www.quanta-computing.com -License: toto -Source: php56-quanta-mon.tgz - -Buildroot : %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: php-devel -Requires: php(zend-abi) = %{php_zend_api} -Requires: php(api) = %{php_core_api} -Requires: libmonikor-devel >= 1.0.0 - -%description -This package contains a PHP extension to allow profiling for Quanta probes. - -%prep -%setup -n php56-quanta-mon - -%build -phpize -%configure - -%install -make clean all -mkdir -p %{buildroot}/etc/php.d/ -mkdir -p %{buildroot}/usr/lib64/php/modules -install -m 644 quanta_mon.ini %{buildroot}/etc/php.d/quanta_mon.ini -install -m 755 modules/quanta_mon.so %{buildroot}/usr/lib64/php/modules/quanta_mon.so - -%files -/usr/lib64/php/modules/quanta_mon.so -/etc/php.d/quanta_mon.ini diff --git a/packager/centos6/php70-remi-quanta-mon/php70-remi-quanta-mon.spec b/packager/centos6/php70-remi-quanta-mon/php70-remi-quanta-mon.spec deleted file mode 100644 index 656a99a..0000000 --- a/packager/centos6/php70-remi-quanta-mon/php70-remi-quanta-mon.spec +++ /dev/null @@ -1,41 +0,0 @@ -Name: php70-remi-quanta-mon -Version: 1.2.1 -Release: 1%{?dist} -Summary: This package provides a PHP profiling module built for Magento. -Distribution: Quanta -Vendor: Quanta-Computing -Packager: Matthieu ROSINSKI -Group: Applications/Internet -URL: http://www.quanta-computing.com -License: toto -Source: php70-remi-quanta-mon.tgz - -Buildroot : %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -%global php_apiver %((echo 0; /opt/remi/php70/root/usr/bin/php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1) - -BuildRequires: php70-php-devel -Requires: php70-php(api) = %{php_apiver}-64 -Requires: php70-php(zend-abi) = %{php_apiver}-64 -Requires: libmonikor-devel >= 1.0.0 - -%description -This package contains a PHP extension to allow profiling for Quanta probes. - -%prep -%setup -n php70-remi-quanta-mon - -%build -/opt/remi/php70/root/usr/bin/phpize -%configure --with-php-config=/opt/remi/php70/root/usr/bin/php-config - -%install -make clean all -mkdir -p %{buildroot}/etc/opt/remi/php70/php.d/ -mkdir -p %{buildroot}/opt/remi/php70/root/usr/lib64/php/modules -install -m 644 quanta_mon.ini %{buildroot}/etc/opt/remi/php70/php.d/20-quanta_mon.ini -install -m 755 modules/quanta_mon.so %{buildroot}/opt/remi/php70/root/usr/lib64/php/modules/quanta_mon.so - -%files -/opt/remi/php70/root/usr/lib64/php/modules/quanta_mon.so -/etc/opt/remi/php70/php.d/20-quanta_mon.ini diff --git a/packager/centos7-php54.dockerfile b/packager/centos7-php54.dockerfile deleted file mode 100644 index f399b34..0000000 --- a/packager/centos7-php54.dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -FROM centos:centos7 -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN curl -s https://www.quanta-monitoring.com/quanta-centos-repo.txt -o /etc/yum.repos.d/quanta.repo -RUN curl -s https://www.quanta-monitoring.com/quanta-repo-key.gpg -o /tmp/quanta.key \ - && rpm --import /tmp/quanta.key \ - && /bin/rm -f /tmp/quanta.key - -RUN yum makecache - -RUN yum -q -y groupinstall "Development tools" - -RUN yum -q -y install \ - quanta-agent \ - php \ - php-devel \ - libmonikor-devel \ - libcurl-devel \ - rpm-build \ - rpmdevtools - -RUN rpmdev-setuptree diff --git a/packager/centos7-php55.dockerfile b/packager/centos7-php55.dockerfile deleted file mode 100644 index 17f4652..0000000 --- a/packager/centos7-php55.dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM centos:centos7 -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN curl -s https://www.quanta-monitoring.com/quanta-centos-repo.txt -o /etc/yum.repos.d/quanta.repo -RUN curl -s https://www.quanta-monitoring.com/quanta-repo-key.gpg -o /tmp/quanta.key \ - && rpm --import /tmp/quanta.key \ - && /bin/rm -f /tmp/quanta.key -RUN yum -q -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN yum -q -y install http://mirror.webtatic.com/yum/el7/webtatic-release.rpm - -RUN yum makecache fast - -RUN yum -q -y groupinstall "Development tools" - -RUN yum -q -y install \ - quanta-agent \ - php55w \ - php55w-devel \ - php55w-gd \ - php55w-mbstring \ - libmonikor-devel \ - libcurl-devel \ - rpm-build \ - rpmdevtools - -RUN rpmdev-setuptree diff --git a/packager/centos7-php56.dockerfile b/packager/centos7-php56.dockerfile deleted file mode 100644 index 433dace..0000000 --- a/packager/centos7-php56.dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM centos:centos7 -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN curl -s https://www.quanta-monitoring.com/quanta-centos-repo.txt -o /etc/yum.repos.d/quanta.repo -RUN curl -s https://www.quanta-monitoring.com/quanta-repo-key.gpg -o /tmp/quanta.key \ - && rpm --import /tmp/quanta.key \ - && /bin/rm -f /tmp/quanta.key -RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN rpm -Uvh https://centos7.iuscommunity.org/ius-release.rpm - -RUN yum makecache fast - -RUN yum -q -y groupinstall "Development tools" - -RUN yum -q -y install \ - quanta-agent \ - php56u \ - php56u-devel \ - php56u-gd \ - php56u-mbstring \ - libmonikor-devel \ - libcurl-devel \ - rpm-build \ - rpmdevtools - -RUN rpmdev-setuptree diff --git a/packager/centos7-php70.dockerfile b/packager/centos7-php70.dockerfile deleted file mode 100644 index dabcd9b..0000000 --- a/packager/centos7-php70.dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM centos:centos7 -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN curl -s https://www.quanta-monitoring.com/quanta-centos-repo.txt -o /etc/yum.repos.d/quanta.repo -RUN curl -s https://www.quanta-monitoring.com/quanta-repo-key.gpg -o /tmp/quanta.key \ - && rpm --import /tmp/quanta.key \ - && /bin/rm -f /tmp/quanta.key -RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN rpm -Uvh https://centos7.iuscommunity.org/ius-release.rpm - -RUN yum makecache fast - -RUN yum -q -y groupinstall "Development tools" - -RUN yum -q -y install \ - quanta-agent \ - php70u \ - php70u-devel \ - php70u-gd \ - php70u-mbstring \ - libmonikor-devel \ - libcurl-devel \ - rpm-build \ - rpmdevtools - -RUN rpmdev-setuptree diff --git a/packager/centos7-php71-remi.dockerfile b/packager/centos7-php71-remi.dockerfile deleted file mode 100644 index 19d9261..0000000 --- a/packager/centos7-php71-remi.dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM centos:centos7 -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN curl -s https://www.quanta-monitoring.com/quanta-centos-repo.txt -o /etc/yum.repos.d/quanta.repo -RUN curl -s https://www.quanta-monitoring.com/quanta-repo-key.gpg -o /tmp/quanta.key \ - && rpm --import /tmp/quanta.key \ - && /bin/rm -f /tmp/quanta.key -RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm - -RUN yum makecache fast - -RUN yum -q -y groupinstall "Development tools" -RUN yum-config-manager --enable remi-php71 - -RUN yum -q -y install \ - quanta-agent \ - php \ - php-devel \ - php-gd \ - php-mbstring \ - libmonikor-devel \ - libcurl-devel \ - rpm-build \ - rpmdevtools - -RUN rpmdev-setuptree diff --git a/packager/centos7-php71-remiphp71.dockerfile b/packager/centos7-php71-remiphp71.dockerfile deleted file mode 100644 index 9b783d3..0000000 --- a/packager/centos7-php71-remiphp71.dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -FROM centos:centos7 -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN curl -s https://www.quanta-monitoring.com/quanta-centos-repo.txt -o /etc/yum.repos.d/quanta.repo -RUN curl -s https://www.quanta-monitoring.com/quanta-repo-key.gpg -o /tmp/quanta.key \ - && rpm --import /tmp/quanta.key \ - && /bin/rm -f /tmp/quanta.key -RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm - -RUN yum makecache fast - -RUN yum -q -y groupinstall "Development tools" - -RUN yum -q -y install yum-utils - -RUN yum -q -y install \ - quanta-agent \ - php71 \ - php71-php-devel \ - php71-php-gd \ - php71-php-mbstring \ - libmonikor-devel \ - libcurl-devel \ - rpm-build \ - rpmdevtools - -RUN rpmdev-setuptree diff --git a/packager/centos7-php71.dockerfile b/packager/centos7-php71.dockerfile deleted file mode 100644 index e35c98d..0000000 --- a/packager/centos7-php71.dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM centos:centos7 -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN curl -s https://rpm.quanta.io/quanta-centos-repo.txt -o /etc/yum.repos.d/quanta.repo -RUN curl -s https://rpm.quanta.io/quanta-repo-key.gpg -o /tmp/quanta.key \ - && rpm --import /tmp/quanta.key \ - && /bin/rm -f /tmp/quanta.key -RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN rpm -Uvh https://centos7.iuscommunity.org/ius-release.rpm - -RUN yum makecache fast - -RUN yum -q -y groupinstall "Development tools" - -RUN yum -q -y install \ - quanta-agent \ - php71u \ - php71u-devel \ - php71u-gd \ - php71u-mbstring \ - libmonikor-devel \ - libcurl-devel \ - rpm-build \ - rpmdevtools - -RUN rpmdev-setuptree diff --git a/packager/centos7/build_package.sh b/packager/centos7/build_package.sh deleted file mode 100755 index 93118e5..0000000 --- a/packager/centos7/build_package.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -set -e - -package=$1 -basedir=/php-module -packagerdir=/php-module/packager/centos7 - -if [ -z "$package" ]; then - echo "Usage: build_package.sh " - exit 1 -fi - -echo "Creating build directory..." -rm -Rf ${packagerdir}/${package}/build -mkdir ${packagerdir}/${package}/build -cp -r ${basedir}/extension ${packagerdir}/${package}/build/${package} -cd ${packagerdir}/${package}/build -cp ${packagerdir}/${package}/${package}.spec /root/rpmbuild/SPECS/${package}.spec -tar czf ${package}.tgz ${package} -mv ${package}.tgz /root/rpmbuild/SOURCES/${package}.tgz - -echo "Cleaning up output dir..." -rm -Rf /root/rpmbuild/RPMS/x86_64/* - -echo "Building package..." -rpmbuild -ba /root/rpmbuild/SPECS/${package}.spec -cp /root/rpmbuild/RPMS/x86_64/* ${packagerdir}/${package}/build - -echo "Testing package..." -rpm -Uvh /root/rpmbuild/RPMS/x86_64/*.rpm -php -i | grep quanta diff --git a/packager/centos7/php54-quanta-mon/php54-quanta-mon.spec b/packager/centos7/php54-quanta-mon/php54-quanta-mon.spec deleted file mode 100644 index a0e598d..0000000 --- a/packager/centos7/php54-quanta-mon/php54-quanta-mon.spec +++ /dev/null @@ -1,39 +0,0 @@ -Name: php54-quanta-mon -Version: 1.2.1 -Release: 1%{?dist} -Summary: This package provides a PHP profiling module built for Magento. -Distribution: Quanta -Vendor: Quanta-Computing -Packager: Matthieu ROSINSKI -Group: Applications/Internet -URL: http://www.quanta-computing.com -License: toto -Source: php54-quanta-mon.tgz - -Buildroot : %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: php-devel -Requires: php(zend-abi) = %{php_zend_api} -Requires: php(api) = %{php_core_api} -Requires: libmonikor-devel >= 1.0.0 - -%description -This package contains a PHP extension to allow profiling for Quanta probes. - -%prep -%setup -n php54-quanta-mon - -%build -phpize -%configure - -%install -make clean all -mkdir -p %{buildroot}/etc/php.d/ -mkdir -p %{buildroot}/usr/lib64/php/modules -install -m 644 quanta_mon.ini %{buildroot}/etc/php.d/quanta_mon.ini -install -m 755 modules/quanta_mon.so %{buildroot}/usr/lib64/php/modules/quanta_mon.so - -%files -/usr/lib64/php/modules/quanta_mon.so -/etc/php.d/quanta_mon.ini diff --git a/packager/centos7/php55-quanta-mon/php55-quanta-mon.spec b/packager/centos7/php55-quanta-mon/php55-quanta-mon.spec deleted file mode 100644 index 427184c..0000000 --- a/packager/centos7/php55-quanta-mon/php55-quanta-mon.spec +++ /dev/null @@ -1,39 +0,0 @@ -Name: php55-quanta-mon -Version: 1.3.0-beta -Release: 1%{?dist} -Summary: This package provides a PHP profiling module built for Magento. -Distribution: Quanta -Vendor: Quanta-Computing -Packager: Matthieu ROSINSKI -Group: Applications/Internet -URL: http://www.quanta-computing.com -License: toto -Source: php55-quanta-mon.tgz - -Buildroot : %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: php-devel -Requires: php(zend-abi) = %{php_zend_api} -Requires: php(api) = %{php_core_api} -Requires: libmonikor-devel >= 1.0.0 - -%description -This package contains a PHP extension to allow profiling for Quanta probes. - -%prep -%setup -n php55-quanta-mon - -%build -phpize -%configure - -%install -make clean all -mkdir -p %{buildroot}/etc/php.d/ -mkdir -p %{buildroot}/usr/lib64/php/modules -install -m 644 quanta_mon.ini %{buildroot}/etc/php.d/quanta_mon.ini -install -m 755 modules/quanta_mon.so %{buildroot}/usr/lib64/php/modules/quanta_mon.so - -%files -/usr/lib64/php/modules/quanta_mon.so -/etc/php.d/quanta_mon.ini diff --git a/packager/centos7/php56-quanta-mon/php56-quanta-mon.spec b/packager/centos7/php56-quanta-mon/php56-quanta-mon.spec deleted file mode 100644 index 6ef104b..0000000 --- a/packager/centos7/php56-quanta-mon/php56-quanta-mon.spec +++ /dev/null @@ -1,39 +0,0 @@ -Name: php56-quanta-mon -Version: 1.3.0-beta -Release: 1%{?dist} -Summary: This package provides a PHP profiling module built for Magento. -Distribution: Quanta -Vendor: Quanta-Computing -Packager: Matthieu ROSINSKI -Group: Applications/Internet -URL: http://www.quanta-computing.com -License: toto -Source: php56-quanta-mon.tgz - -Buildroot : %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: php-devel -Requires: php(zend-abi) = %{php_zend_api} -Requires: php(api) = %{php_core_api} -Requires: libmonikor-devel >= 1.0.0 - -%description -This package contains a PHP extension to allow profiling for Quanta probes. - -%prep -%setup -n php56-quanta-mon - -%build -phpize -%configure - -%install -make clean all -mkdir -p %{buildroot}/etc/php.d/ -mkdir -p %{buildroot}/usr/lib64/php/modules -install -m 644 quanta_mon.ini %{buildroot}/etc/php.d/quanta_mon.ini -install -m 756 modules/quanta_mon.so %{buildroot}/usr/lib64/php/modules/quanta_mon.so - -%files -/usr/lib64/php/modules/quanta_mon.so -/etc/php.d/quanta_mon.ini diff --git a/packager/centos7/php70-quanta-mon/php70-quanta-mon.spec b/packager/centos7/php70-quanta-mon/php70-quanta-mon.spec deleted file mode 100644 index 1dedf59..0000000 --- a/packager/centos7/php70-quanta-mon/php70-quanta-mon.spec +++ /dev/null @@ -1,39 +0,0 @@ -Name: php70-quanta-mon -Version: 1.2.1 -Release: 1%{?dist} -Summary: This package provides a PHP profiling module built for Magento. -Distribution: Quanta -Vendor: Quanta-Computing -Packager: Matthieu ROSINSKI -Group: Applications/Internet -URL: http://www.quanta-computing.com -License: toto -Source: php70-quanta-mon.tgz - -Buildroot : %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: php-devel -Requires: php(zend-abi) = %{php_zend_api} -Requires: php(api) = %{php_core_api} -Requires: libmonikor-devel >= 1.0.0 - -%description -This package contains a PHP extension to allow profiling for Quanta probes. - -%prep -%setup -n php70-quanta-mon - -%build -phpize -%configure - -%install -make clean all -mkdir -p %{buildroot}/etc/php.d/ -mkdir -p %{buildroot}/usr/lib64/php/modules -install -m 644 quanta_mon.ini %{buildroot}/etc/php.d/quanta_mon.ini -install -m 770 modules/quanta_mon.so %{buildroot}/usr/lib64/php/modules/quanta_mon.so - -%files -/usr/lib64/php/modules/quanta_mon.so -/etc/php.d/quanta_mon.ini diff --git a/packager/centos7/php71-quanta-mon/php71-quanta-mon.spec b/packager/centos7/php71-quanta-mon/php71-quanta-mon.spec deleted file mode 100644 index cba6f37..0000000 --- a/packager/centos7/php71-quanta-mon/php71-quanta-mon.spec +++ /dev/null @@ -1,39 +0,0 @@ -Name: php71-quanta-mon -Version: 1.2.2 -Release: 1%{?dist} -Summary: This package provides a PHP profiling module built for Magento. -Distribution: Quanta -Vendor: Quanta-Computing -Packager: Matthieu ROSINSKI -Group: Applications/Internet -URL: http://www.quanta-computing.com -License: toto -Source: php71-quanta-mon.tgz - -Buildroot : %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: php-devel -Requires: php(zend-abi) = %{php_zend_api} -Requires: php(api) = %{php_core_api} -Requires: libmonikor-devel >= 1.0.0 - -%description -This package contains a PHP extension to allow profiling for Quanta probes. - -%prep -%setup -n php71-quanta-mon - -%build -phpize -%configure - -%install -make clean all -mkdir -p %{buildroot}/etc/php.d/ -mkdir -p %{buildroot}/usr/lib64/php/modules -install -m 644 quanta_mon.ini %{buildroot}/etc/php.d/quanta_mon.ini -install -m 770 modules/quanta_mon.so %{buildroot}/usr/lib64/php/modules/quanta_mon.so - -%files -/usr/lib64/php/modules/quanta_mon.so -/etc/php.d/quanta_mon.ini diff --git a/packager/centos7/php71-remi-quanta-mon/php71-remi-quanta-mon.spec b/packager/centos7/php71-remi-quanta-mon/php71-remi-quanta-mon.spec deleted file mode 100644 index 30830ac..0000000 --- a/packager/centos7/php71-remi-quanta-mon/php71-remi-quanta-mon.spec +++ /dev/null @@ -1,40 +0,0 @@ -Name: php71-remi-quanta-mon -Version: 1.2.2 -Release: 1%{?dist} -Summary: This package provides a PHP profiling module built for Magento. -Distribution: Quanta -Vendor: Quanta-Computing -Packager: Matthieu ROSINSKI -Group: Applications/Internet -URL: http://www.quanta-computing.com -License: toto -Source: php71-remi-quanta-mon.tgz - -Buildroot : %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: php-devel -BuildRequires: libmonikor-devel -Requires: php(zend-abi) = %{php_zend_api} -Requires: php(api) = %{php_core_api} -Requires: libmonikor >= 1.0.0 - -%description -This package contains a PHP extension to allow profiling for Quanta probes. - -%prep -%setup -n php71-remi-quanta-mon - -%build -phpize -%configure - -%install -make clean all -mkdir -p %{buildroot}/etc/php.d/ -mkdir -p %{buildroot}/usr/lib64/php/modules -install -m 644 quanta_mon.ini %{buildroot}/etc/php.d/20-quanta_mon.ini -install -m 770 modules/quanta_mon.so %{buildroot}/usr/lib64/php/modules/quanta_mon.so - -%files -/usr/lib64/php/modules/quanta_mon.so -/etc/php.d/20-quanta_mon.ini diff --git a/packager/centos7/php71-remiphp71-quanta-mon/php71-remiphp71-quanta-mon.spec b/packager/centos7/php71-remiphp71-quanta-mon/php71-remiphp71-quanta-mon.spec deleted file mode 100644 index fb87554..0000000 --- a/packager/centos7/php71-remiphp71-quanta-mon/php71-remiphp71-quanta-mon.spec +++ /dev/null @@ -1,40 +0,0 @@ -Name: php71-remiphp71-quanta-mon -Version: 1.2.2 -Release: 2%{?dist} -Summary: This package provides a PHP profiling module built for Magento. -Distribution: Quanta -Vendor: Quanta-Computing -Packager: Matthieu ROSINSKI -Group: Applications/Internet -URL: http://www.quanta-computing.com -License: toto -Source: php71-remiphp71-quanta-mon.tgz - -Buildroot : %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: php71-php-devel -BuildRequires: libmonikor-devel -Requires: php71-php(zend-abi) = 20160303-64 -Requires: php71-php(api) = 20160303-64 -Requires: libmonikor >= 1.0.0 - -%description -This package contains a PHP extension to allow profiling for Quanta probes. - -%prep -%setup -n php71-remiphp71-quanta-mon - -%build -/opt/remi/php71/root/bin/phpize -%configure --with-php-config=/opt/remi/php71/root/bin/php-config - -%install -make clean all -mkdir -p %{buildroot}/etc/opt/remi/php71/php.d/ -mkdir -p %{buildroot}/opt/remi/php71/root/usr/lib64/php/modules/ -install -m 644 quanta_mon.ini %{buildroot}/etc/opt/remi/php71/php.d/20-quanta_mon.ini -install -m 770 modules/quanta_mon.so %{buildroot}/opt/remi/php71/root/usr/lib64/php/modules/quanta_mon.so - -%files -/opt/remi/php71/root/usr/lib64/php/modules/quanta_mon.so -/etc/opt/remi/php71/php.d/20-quanta_mon.ini diff --git a/packager/debian6-php53.dockerfile b/packager/debian6-php53.dockerfile deleted file mode 100644 index 5ee06a8..0000000 --- a/packager/debian6-php53.dockerfile +++ /dev/null @@ -1,47 +0,0 @@ -FROM debian/eol:squeeze -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN sed -i 's/httpredir\.debian\.org/ftp.fr.debian.org/g' /etc/apt/sources.list -RUN apt-get update && apt-get install -y curl -RUN echo 'deb http://apt.quanta.gr quanta-squeeze/' > /etc/apt/sources.list.d/quanta.list -RUN echo 'deb http://repo.mysql.com/apt/debian squeeze mysql-5.6' > /etc/apt/sources.list.d/mysql.list -RUN curl -s https://www.quanta-monitoring.com/quanta-repo-key.gpg -o - | apt-key add - -RUN curl -s https://www.dotdeb.org/dotdeb.gpg -o - | apt-key add - -RUN apt-key adv --keyserver pgp.mit.edu --recv-keys 5072E1F5 - -RUN apt-get update && apt-get install -y \ - build-essential \ - debhelper \ - dh-exec \ - dh-autoreconf \ - autotools-dev \ - devscripts \ - dput \ - vim \ - quilt \ - openssh-client \ - sendmail \ - wget - -RUN echo 'mysql-server mysql-server/root_password password ' | debconf-set-selections -RUN echo 'mysql-server mysql-server/root_password_again password ' | debconf-set-selections - -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ - apache2 \ - mysql-server \ - libcurl4-openssl-dev \ - quanta-agent \ - libmonikor-dev - - -RUN apt-get update && apt-get install -y \ - php5-dev \ - php5-gd \ - php5-curl \ - php5-intl \ - php5-json \ - php5-mcrypt \ - php5-dbg \ - php5-mysql \ - php5-mbstring - libapache2-mod-php5 diff --git a/packager/debian6-php54.dockerfile b/packager/debian6-php54.dockerfile deleted file mode 100644 index bdc2323..0000000 --- a/packager/debian6-php54.dockerfile +++ /dev/null @@ -1,36 +0,0 @@ -FROM debian/eol:squeeze -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN sed -i 's/httpredir\.debian\.org/ftp.fr.debian.org/g' /etc/apt/sources.list -RUN apt-get update && apt-get install -y curl -RUN echo 'deb http://apt.quanta.gr quanta-squeeze/' > /etc/apt/sources.list.d/quanta.list -RUN curl -s https://www.quanta-monitoring.com/quanta-repo-key.gpg -o - | apt-key add - -RUN curl -s https://www.dotdeb.org/dotdeb.gpg -o - | apt-key add - -RUN apt-key adv --keyserver pgp.mit.edu --recv-keys 5072E1F5 - -RUN apt-get update && apt-get install -y \ - build-essential \ - debhelper \ - dh-autoreconf \ - autotools-dev \ - devscripts \ - dput \ - vim \ - quilt \ - openssh-client \ - wget - -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ - apache2 \ - libcurl4-openssl-dev \ - quanta-agent \ - libmonikor-dev \ - libyaml-dev - -RUN echo 'deb http://packages.dotdeb.org squeeze-php54 all' > /etc/apt/sources.list.d/dotdeb.list - -RUN apt-get update && apt-get install -y \ - php5 \ - php5-dev \ - php5-dbg \ - libapache2-mod-php5 diff --git a/packager/debian6/build_package.sh b/packager/debian6/build_package.sh deleted file mode 100755 index fe8e524..0000000 --- a/packager/debian6/build_package.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -package=$1 -basedir=/php-module -packagerdir=/php-module/packager/debian6 -builddir=${packagerdir}/${package}/build -outdir=${packagerdir}/${package}/pkg - -if [ -z "$package" ]; then - echo "Usage: build_package.sh " - exit 1 -fi - -echo "Creating build directory..." -rm -Rf ${builddir} -mkdir -p /packager -cp -r ${basedir}/extension ${builddir} -cp -r ${packagerdir}/${package}/debian ${builddir} -cd ${builddir} - - -echo "Building package..." -debuild -us -uc - -echo "Delivering packages" -rm -Rf ${outdir} -mkdir -p ${outdir} -cp -v /packager/php* ${outdir} - -echo "Testing package..." -dpkg -i ${outdir}/*.deb -php5enmod quanta_mon || echo "No php5enmod" -php -i | grep quanta diff --git a/packager/debian6/php53-quanta-mon/debian/changelog b/packager/debian6/php53-quanta-mon/debian/changelog deleted file mode 100644 index 46497ac..0000000 --- a/packager/debian6/php53-quanta-mon/debian/changelog +++ /dev/null @@ -1,11 +0,0 @@ -php53-quanta-mon (1.2.2) quanta; urgency=medium - - * Fix a (weird) bug with execute_data and prev_execute_data on PHP 5.5 and PHP 5.6 - - -- Matthieu ROSINSKI Wed, 25 Oct 2016 16:12:42 +0100 - -php53-quanta-mon (1.2.1) quanta-squeeze; urgency=medium - - * Initial release. - - -- Matthieu ROSINSKI Thu, 10 Mar 2016 14:56:19 +0100 diff --git a/packager/debian6/php53-quanta-mon/debian/compat b/packager/debian6/php53-quanta-mon/debian/compat deleted file mode 100644 index 45a4fb7..0000000 --- a/packager/debian6/php53-quanta-mon/debian/compat +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/packager/debian6/php53-quanta-mon/debian/control b/packager/debian6/php53-quanta-mon/debian/control deleted file mode 100644 index 3198a1a..0000000 --- a/packager/debian6/php53-quanta-mon/debian/control +++ /dev/null @@ -1,16 +0,0 @@ -Maintainer: Matthieu ROSINSKI -Section: php -Priority: optional -Build-Depends: debhelper (>= 8), dh-autoreconf, autotools-dev, libmonikor-dev, php5-dev -Standards-Version: 3.9.5 -Source: php53-quanta-mon - -Package: php53-quanta-mon -Provides: php-quanta-mon -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libmonikor (>= 1.0.0), php5-common (>= 5.3.0), phpapi-20090626, ucf -Recommends: monikor -Pre-Depends: ${misc:Pre-Depends} -Description: This PHP extension provides a profiler for Magento - The extension will trigger on custom http headers and send metrics to - Quanta over the quanta-agent. diff --git a/packager/debian6/php53-quanta-mon/debian/copyright b/packager/debian6/php53-quanta-mon/debian/copyright deleted file mode 100644 index c664af7..0000000 --- a/packager/debian6/php53-quanta-mon/debian/copyright +++ /dev/null @@ -1,348 +0,0 @@ -Copyright Quanta-Computing 2016 - -1. Preamble -This Agreement, signed on Mar 14, 2016 (hereinafter: Effective Date) governs -the relationship between the client, a Business Entity, (hereinafter: Licensee) -and Quanta-Computing, a duly registered company in whose principal place of -business is 41 rue Saint-Augustin, Paris, France (hereinafter: Licensor). This -Agreement sets the terms, rights, restrictions and obligations on using -php-quanta-mon (hereinafter: The Software) created and owned by Licensor, as -detailed herein. - -2. License Grant -Licensor hereby grants Licensee a Sublicensable, Non-assignable & -non-transferable, Pepetual, Non-commercial, Including the rights to distribute -derivative works, Non-exclusive license, all with accordance with the terms set -forth and other legal restrictions set forth in 3rd party software used while -running Software. - -2.1. Limited: Licensee may use Software for the purpose of: -2.1.1. Running Software on Licensee’s Website[s] and Server[s]; -2.1.2. Allowing 3rd Parties to run Software on Licensee’s Website[s] and Server[s]; -2.1.3. Publishing Software’s output to Licensee and 3rd Parties; -2.1.4. Distribute verbatim copies of Software’s output (including compiled binaries); -2.1.5. Modify Software to suit Licensee’s needs and specifications. - -2.2. This license is granted perpetually, as long as you do not materially breach it. - -2.3. Non Assignable & Non-Transferable -Licensee may not assign or transfer his rights and duties under this license. - -2.4. Non-Commercial -Licensee may not use Software for commercial purposes. for the purpose of this -license, commercial purposes means that a 3rd party has to pay in order to -access Software or that the Website that runs Software is behind a paywall. - -2.5. Including the right to Distribute Derivative Works -Licensee may create and distribute derivative works based on Software, including -amending Software’s source code, modifying it, integrating it into a larger -work or removing portions of Software, as long as credit to the Licensor is -granted and that redistribution is made under the terms of this license. - -2.6. [Multi-]Site -Licensee may use Software on unlimited server[s] and unlimited website[s], for -Licensee’s websites only. - -3. Term & Termination -The Term of this license shall be until terminated. Licensor may terminate this -Agreement, including Licensee’s license in the case where Licensee : - -3.1. became insolvent or otherwise entered into any liquidation process; or -3.2. exported The Software to any jurisdiction where licensor may not enforce -his rights under this agreements in; or -3.3. Licensee was in breach of any of this license's terms and conditions and -such breach was not cured, immediately upon notification; or -3.4 Licensee in breach of any of the terms of clause 2 to this license; or -3.5. Licensee otherwise entered into any arrangement which caused Licensor to -be unable to enforce his rights under this License. - -4. Upgrades, Updates and Fixes -Licensor may provide Licensee, from time to time, with Upgrades, Updates or -Fixes, as detailed herein and according to his sole discretion. Licensor shall -provide any update or Fix free of charge; however, nothing in this Agreement -shall require Licensor to provide Updates or Fixes. - -4.1. Upgrades -For the purpose of this license, an Upgrade shall be a material amendment in -The Software, which contains new features and or major performance improvements -and shall be marked as a new version number. For example, should Licensee purchase -The Software under version 1.X.X, an upgrade shall commence under number 2.0.0. - -4.2. Updates -For the purpose of this license, an update shall be a minor amendment in The -Software, which may contain new features or minor improvements and shall be -marked as a new sub-version number. For example, should Licensee purchase The -Software under version 1.1.X, an upgrade shall commence under number 1.2.0. - -4.3. Fix -For the purpose of this license, a fix shall be a minor amendment in The -Software, intended to remove bugs or alter minor features which impair the -The Software's functionality. A fix shall be marked as a new sub-sub-version -number. For example, should Licensee purchase Software under version 1.1.1, an -upgrade shall commence under number 1.1.2. - -5. Support -Software is provided under an AS-IS basis and without any support, updates or -maintenance. Nothing in this Agreement shall require Licensor to provide Licensee -with support or fixes to any bug, failure, mis-performance or other defect in -The Software. - -5.1. Bug Notification -Licensee may provide Licensor of details regarding any bug, defect or failure -in The Software promptly and with no delay from such event; Licensee shall -comply with Licensor's request for information regarding bugs, defects or -failures and furnish him with information, screenshots and try to reproduce -such bugs, defects or failures. - -5.2. Feature Request -Licensee may request additional features in Software, provided, however, that -(i) Licensee shall waive any claim or right in such feature should feature be -developed by Licensor; (ii) Licensee shall be prohibited from developing the -feature, or disclose such feature request, or feature, to any 3rd party directly -competing with Licensor or any 3rd party which may be, following the development -of such feature, in direct competition with Licensor; (iii) Licensee warrants -that feature does not infringe any 3rd party patent, trademark, trade-secret or -any other intellectual property right; and (iv) Licensee developed, envisioned -or created the feature solely by himself. - -6. Liability -To the extent permitted under Law, The Software is provided under an AS-IS basis. -Licensor shall never, and without any limit, be liable for any damage, cost, -expense or any other payment incurred by Licensee as a result of Software’s -actions, failure, bugs and/or any other interaction between The Software and -Licensee’s end-equipment, computers, other software or any 3rd party, -end-equipment, computer or services. Moreover, Licensor shall never be liable -for any defect in source code written by Licensee when relying on The Software -or using The Software’s source code. - -7. Warranty - -7.1. Intellectual Property -Licensor hereby warrants that The Software does not violate or infringe any 3rd -party claims in regards to intellectual property, patents and/or trademarks and -that to the best of its knowledge no legal action has been taken against it for -any infringement or violation of any 3rd party intellectual property rights. - -7.2. No-Warranty -The Software is provided without any warranty; Licensor hereby disclaims any -warranty that The Software shall be error free, without defects or code which -may cause damage to Licensee’s computers or to Licensee, and that Software -shall be functional. Licensee shall be solely liable to any damage, defect or -loss incurred as a result of operating software and undertake the risks -contained in running The Software on License’s Server[s] and Website[s]. - -7.3. Prior Inspection -Licensee hereby states that he inspected The Software thoroughly and found -it satisfactory and adequate to his needs, that it does not interfere with his -regular operation and that it does meet the standards and scope of his computer -systems and architecture. Licensee found that The Software interacts with his -development, website and server environment and that it does not infringe any of -End User License Agreement of any software Licensee may use in performing his -services. Licensee hereby waives any claims regarding The Software's -incompatibility, performance, results and features, and warrants that he -inspected the The Software. - -8. No Refunds -Licensee warrants that he inspected The Software according to clause 7(c) and -that it is adequate to his needs. Accordingly, as The Software is intangible -goods, Licensee shall not be, ever, entitled to any refund, rebate, compensation -or restitution for any reason whatsoever, even if The Software contains -material flaws. - -9. Indemnification -Licensee hereby warrants to hold Licensor harmless and indemnify Licensor for -any lawsuit brought against it in regards to Licensee’s use of The Software in -means that violate, breach or otherwise circumvent this license, Licensor's -intellectual property rights or Licensor's title in The Software. Licensor shall -promptly notify Licensee in case of such legal action and request Licensee’s -consent prior to any settlement in relation to such lawsuit or claim. - -10. Governing Law, Jurisdiction -Licensee hereby agrees not to initiate class-action lawsuits against Licensor -in relation to this license and to compensate Licensor for any legal fees, cost -or attorney fees should any claim brought by Licensee against Licensor be -denied, in part or in full. - -11. Other software used - -This software is a derivative work of xhprof, delivered under the Apache -license version 2.0. You will find below a copy of this license. - - -Apache License - - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS diff --git a/packager/debian6/php53-quanta-mon/debian/rules b/packager/debian6/php53-quanta-mon/debian/rules deleted file mode 100644 index 303f46a..0000000 --- a/packager/debian6/php53-quanta-mon/debian/rules +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/make -f - -build: - phpize - dh_build - -override_dh_auto_install: - $(MAKE) INSTALL_ROOT=$$(pwd)/debian/php53-quanta-mon install - install -D -m 0644 quanta_mon.ini debian/php53-quanta-mon/etc/php5/conf.d/quanta_mon.ini - -override_dh_shlibdeps: - dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info - -%: - dh $@ diff --git a/packager/debian6/php53-quanta-mon/debian/source/format b/packager/debian6/php53-quanta-mon/debian/source/format deleted file mode 100644 index 89ae9db..0000000 --- a/packager/debian6/php53-quanta-mon/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (native) diff --git a/packager/debian6/php54-quanta-mon/debian/changelog b/packager/debian6/php54-quanta-mon/debian/changelog deleted file mode 100644 index a9de95c..0000000 --- a/packager/debian6/php54-quanta-mon/debian/changelog +++ /dev/null @@ -1,11 +0,0 @@ -php54-quanta-mon (1.2.2) quanta; urgency=medium - - * Fix a (weird) bug with execute_data and prev_execute_data on PHP 5.5 and PHP 5.6 - - -- Matthieu ROSINSKI Wed, 25 Oct 2016 16:12:42 +0100 - -php54-quanta-mon (1.2.1) quanta-squeeze; urgency=medium - - * Initial release. - - -- Matthieu ROSINSKI Thu, 10 Mar 2016 14:56:19 +0100 diff --git a/packager/debian6/php54-quanta-mon/debian/compat b/packager/debian6/php54-quanta-mon/debian/compat deleted file mode 100644 index 45a4fb7..0000000 --- a/packager/debian6/php54-quanta-mon/debian/compat +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/packager/debian6/php54-quanta-mon/debian/control b/packager/debian6/php54-quanta-mon/debian/control deleted file mode 100644 index 27f4675..0000000 --- a/packager/debian6/php54-quanta-mon/debian/control +++ /dev/null @@ -1,16 +0,0 @@ -Maintainer: Matthieu ROSINSKI -Section: php -Priority: optional -Build-Depends: debhelper (>= 8), dh-autoreconf, autotools-dev, libmonikor-dev, php5-dev -Standards-Version: 3.9.5 -Source: php54-quanta-mon - -Package: php54-quanta-mon -Provides: php-quanta-mon -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libmonikor (>= 1.0.0), php5-common (>= 5.4.0), phpapi-20100525, ucf -Recommends: monikor -Pre-Depends: ${misc:Pre-Depends} -Description: This PHP extension provides a profiler for Magento - The extension will trigger on custom http headers and send metrics to - Quanta over the quanta-agent. diff --git a/packager/debian6/php54-quanta-mon/debian/copyright b/packager/debian6/php54-quanta-mon/debian/copyright deleted file mode 100644 index c664af7..0000000 --- a/packager/debian6/php54-quanta-mon/debian/copyright +++ /dev/null @@ -1,348 +0,0 @@ -Copyright Quanta-Computing 2016 - -1. Preamble -This Agreement, signed on Mar 14, 2016 (hereinafter: Effective Date) governs -the relationship between the client, a Business Entity, (hereinafter: Licensee) -and Quanta-Computing, a duly registered company in whose principal place of -business is 41 rue Saint-Augustin, Paris, France (hereinafter: Licensor). This -Agreement sets the terms, rights, restrictions and obligations on using -php-quanta-mon (hereinafter: The Software) created and owned by Licensor, as -detailed herein. - -2. License Grant -Licensor hereby grants Licensee a Sublicensable, Non-assignable & -non-transferable, Pepetual, Non-commercial, Including the rights to distribute -derivative works, Non-exclusive license, all with accordance with the terms set -forth and other legal restrictions set forth in 3rd party software used while -running Software. - -2.1. Limited: Licensee may use Software for the purpose of: -2.1.1. Running Software on Licensee’s Website[s] and Server[s]; -2.1.2. Allowing 3rd Parties to run Software on Licensee’s Website[s] and Server[s]; -2.1.3. Publishing Software’s output to Licensee and 3rd Parties; -2.1.4. Distribute verbatim copies of Software’s output (including compiled binaries); -2.1.5. Modify Software to suit Licensee’s needs and specifications. - -2.2. This license is granted perpetually, as long as you do not materially breach it. - -2.3. Non Assignable & Non-Transferable -Licensee may not assign or transfer his rights and duties under this license. - -2.4. Non-Commercial -Licensee may not use Software for commercial purposes. for the purpose of this -license, commercial purposes means that a 3rd party has to pay in order to -access Software or that the Website that runs Software is behind a paywall. - -2.5. Including the right to Distribute Derivative Works -Licensee may create and distribute derivative works based on Software, including -amending Software’s source code, modifying it, integrating it into a larger -work or removing portions of Software, as long as credit to the Licensor is -granted and that redistribution is made under the terms of this license. - -2.6. [Multi-]Site -Licensee may use Software on unlimited server[s] and unlimited website[s], for -Licensee’s websites only. - -3. Term & Termination -The Term of this license shall be until terminated. Licensor may terminate this -Agreement, including Licensee’s license in the case where Licensee : - -3.1. became insolvent or otherwise entered into any liquidation process; or -3.2. exported The Software to any jurisdiction where licensor may not enforce -his rights under this agreements in; or -3.3. Licensee was in breach of any of this license's terms and conditions and -such breach was not cured, immediately upon notification; or -3.4 Licensee in breach of any of the terms of clause 2 to this license; or -3.5. Licensee otherwise entered into any arrangement which caused Licensor to -be unable to enforce his rights under this License. - -4. Upgrades, Updates and Fixes -Licensor may provide Licensee, from time to time, with Upgrades, Updates or -Fixes, as detailed herein and according to his sole discretion. Licensor shall -provide any update or Fix free of charge; however, nothing in this Agreement -shall require Licensor to provide Updates or Fixes. - -4.1. Upgrades -For the purpose of this license, an Upgrade shall be a material amendment in -The Software, which contains new features and or major performance improvements -and shall be marked as a new version number. For example, should Licensee purchase -The Software under version 1.X.X, an upgrade shall commence under number 2.0.0. - -4.2. Updates -For the purpose of this license, an update shall be a minor amendment in The -Software, which may contain new features or minor improvements and shall be -marked as a new sub-version number. For example, should Licensee purchase The -Software under version 1.1.X, an upgrade shall commence under number 1.2.0. - -4.3. Fix -For the purpose of this license, a fix shall be a minor amendment in The -Software, intended to remove bugs or alter minor features which impair the -The Software's functionality. A fix shall be marked as a new sub-sub-version -number. For example, should Licensee purchase Software under version 1.1.1, an -upgrade shall commence under number 1.1.2. - -5. Support -Software is provided under an AS-IS basis and without any support, updates or -maintenance. Nothing in this Agreement shall require Licensor to provide Licensee -with support or fixes to any bug, failure, mis-performance or other defect in -The Software. - -5.1. Bug Notification -Licensee may provide Licensor of details regarding any bug, defect or failure -in The Software promptly and with no delay from such event; Licensee shall -comply with Licensor's request for information regarding bugs, defects or -failures and furnish him with information, screenshots and try to reproduce -such bugs, defects or failures. - -5.2. Feature Request -Licensee may request additional features in Software, provided, however, that -(i) Licensee shall waive any claim or right in such feature should feature be -developed by Licensor; (ii) Licensee shall be prohibited from developing the -feature, or disclose such feature request, or feature, to any 3rd party directly -competing with Licensor or any 3rd party which may be, following the development -of such feature, in direct competition with Licensor; (iii) Licensee warrants -that feature does not infringe any 3rd party patent, trademark, trade-secret or -any other intellectual property right; and (iv) Licensee developed, envisioned -or created the feature solely by himself. - -6. Liability -To the extent permitted under Law, The Software is provided under an AS-IS basis. -Licensor shall never, and without any limit, be liable for any damage, cost, -expense or any other payment incurred by Licensee as a result of Software’s -actions, failure, bugs and/or any other interaction between The Software and -Licensee’s end-equipment, computers, other software or any 3rd party, -end-equipment, computer or services. Moreover, Licensor shall never be liable -for any defect in source code written by Licensee when relying on The Software -or using The Software’s source code. - -7. Warranty - -7.1. Intellectual Property -Licensor hereby warrants that The Software does not violate or infringe any 3rd -party claims in regards to intellectual property, patents and/or trademarks and -that to the best of its knowledge no legal action has been taken against it for -any infringement or violation of any 3rd party intellectual property rights. - -7.2. No-Warranty -The Software is provided without any warranty; Licensor hereby disclaims any -warranty that The Software shall be error free, without defects or code which -may cause damage to Licensee’s computers or to Licensee, and that Software -shall be functional. Licensee shall be solely liable to any damage, defect or -loss incurred as a result of operating software and undertake the risks -contained in running The Software on License’s Server[s] and Website[s]. - -7.3. Prior Inspection -Licensee hereby states that he inspected The Software thoroughly and found -it satisfactory and adequate to his needs, that it does not interfere with his -regular operation and that it does meet the standards and scope of his computer -systems and architecture. Licensee found that The Software interacts with his -development, website and server environment and that it does not infringe any of -End User License Agreement of any software Licensee may use in performing his -services. Licensee hereby waives any claims regarding The Software's -incompatibility, performance, results and features, and warrants that he -inspected the The Software. - -8. No Refunds -Licensee warrants that he inspected The Software according to clause 7(c) and -that it is adequate to his needs. Accordingly, as The Software is intangible -goods, Licensee shall not be, ever, entitled to any refund, rebate, compensation -or restitution for any reason whatsoever, even if The Software contains -material flaws. - -9. Indemnification -Licensee hereby warrants to hold Licensor harmless and indemnify Licensor for -any lawsuit brought against it in regards to Licensee’s use of The Software in -means that violate, breach or otherwise circumvent this license, Licensor's -intellectual property rights or Licensor's title in The Software. Licensor shall -promptly notify Licensee in case of such legal action and request Licensee’s -consent prior to any settlement in relation to such lawsuit or claim. - -10. Governing Law, Jurisdiction -Licensee hereby agrees not to initiate class-action lawsuits against Licensor -in relation to this license and to compensate Licensor for any legal fees, cost -or attorney fees should any claim brought by Licensee against Licensor be -denied, in part or in full. - -11. Other software used - -This software is a derivative work of xhprof, delivered under the Apache -license version 2.0. You will find below a copy of this license. - - -Apache License - - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS diff --git a/packager/debian6/php54-quanta-mon/debian/rules b/packager/debian6/php54-quanta-mon/debian/rules deleted file mode 100644 index 4dd8525..0000000 --- a/packager/debian6/php54-quanta-mon/debian/rules +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/make -f - -build: - phpize - dh_build - -override_dh_auto_install: - $(MAKE) INSTALL_ROOT=$$(pwd)/debian/php54-quanta-mon install - install -D -m 0644 quanta_mon.ini debian/php54-quanta-mon/etc/php5/mods-available/quanta_mon.ini - -override_dh_shlibdeps: - dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info - -%: - dh $@ diff --git a/packager/debian6/php54-quanta-mon/debian/source/format b/packager/debian6/php54-quanta-mon/debian/source/format deleted file mode 100644 index 89ae9db..0000000 --- a/packager/debian6/php54-quanta-mon/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (native) diff --git a/packager/debian7-php54.dockerfile b/packager/debian7-php54.dockerfile deleted file mode 100644 index a766c76..0000000 --- a/packager/debian7-php54.dockerfile +++ /dev/null @@ -1,45 +0,0 @@ -FROM debian:wheezy -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN sed -i 's/httpredir\.debian\.org/ftp.fr.debian.org/g' /etc/apt/sources.list -RUN apt-get update && apt-get install -y curl -RUN echo 'deb http://apt.quanta.gr quanta/' > /etc/apt/sources.list.d/quanta.list -RUN echo 'deb http://repo.mysql.com/apt/debian wheezy mysql-5.6' > /etc/apt/sources.list.d/mysql.list -RUN curl -s https://www.quanta-monitoring.com/quanta-repo-key.gpg -o - | apt-key add - -RUN curl -s https://www.dotdeb.org/dotdeb.gpg -o - | apt-key add - -RUN apt-key adv --keyserver pgp.mit.edu --recv-keys 5072E1F5 - -RUN apt-get update && apt-get install -y \ - build-essential \ - debhelper \ - dh-exec \ - dh-autoreconf \ - autotools-dev \ - devscripts \ - dput \ - vim \ - quilt \ - openssh-client \ - sendmail \ - wget - -RUN echo 'mysql-server mysql-server/root_password password ' | debconf-set-selections -RUN echo 'mysql-server mysql-server/root_password_again password ' | debconf-set-selections - -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ - apache2 \ - mysql-server \ - libcurl4-openssl-dev \ - quanta-agent \ - libmonikor-dev - -RUN apt-get update && apt-get install -y \ - php5-dev \ - php5-gd \ - php5-curl \ - php5-intl \ - php5-json \ - php5-mcrypt \ - php5-dbg \ - php5-mysql \ - libapache2-mod-php5 diff --git a/packager/debian7-php55.dockerfile b/packager/debian7-php55.dockerfile deleted file mode 100644 index a28cfd9..0000000 --- a/packager/debian7-php55.dockerfile +++ /dev/null @@ -1,47 +0,0 @@ -FROM debian:wheezy -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN sed -i 's/httpredir\.debian\.org/ftp.fr.debian.org/g' /etc/apt/sources.list -RUN apt-get update && apt-get install -y curl -RUN echo 'deb http://apt.quanta.gr quanta/' > /etc/apt/sources.list.d/quanta.list -RUN echo 'deb http://repo.mysql.com/apt/debian wheezy mysql-5.6' > /etc/apt/sources.list.d/mysql.list -RUN curl -s https://www.quanta-monitoring.com/quanta-repo-key.gpg -o - | apt-key add - -RUN curl -s https://www.dotdeb.org/dotdeb.gpg -o - | apt-key add - -RUN apt-key adv --keyserver pgp.mit.edu --recv-keys 5072E1F5 - -RUN apt-get update && apt-get install -y \ - build-essential \ - debhelper \ - dh-exec \ - dh-autoreconf \ - autotools-dev \ - devscripts \ - dput \ - vim \ - quilt \ - openssh-client \ - sendmail \ - wget - -RUN echo 'mysql-server mysql-server/root_password password ' | debconf-set-selections -RUN echo 'mysql-server mysql-server/root_password_again password ' | debconf-set-selections - -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ - apache2 \ - mysql-server \ - libcurl4-openssl-dev \ - quanta-agent \ - libmonikor-dev - -RUN echo 'deb http://packages.dotdeb.org wheezy-php55 all' > /etc/apt/sources.list.d/dotdeb.list - -RUN apt-get update && apt-get install -y \ - php5-dev \ - php5-gd \ - php5-curl \ - php5-intl \ - php5-json \ - php5-mcrypt \ - php5-dbg \ - php5-mysql \ - libapache2-mod-php5 diff --git a/packager/debian7-php56.dockerfile b/packager/debian7-php56.dockerfile deleted file mode 100644 index 3797163..0000000 --- a/packager/debian7-php56.dockerfile +++ /dev/null @@ -1,47 +0,0 @@ -FROM debian:wheezy -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN sed -i 's/httpredir\.debian\.org/ftp.fr.debian.org/g' /etc/apt/sources.list -RUN apt-get update && apt-get install -y curl -RUN echo 'deb http://apt.quanta.gr quanta/' > /etc/apt/sources.list.d/quanta.list -RUN echo 'deb http://repo.mysql.com/apt/debian wheezy mysql-5.6' > /etc/apt/sources.list.d/mysql.list -RUN curl -s https://www.quanta-monitoring.com/quanta-repo-key.gpg -o - | apt-key add - -RUN curl -s https://www.dotdeb.org/dotdeb.gpg -o - | apt-key add - -RUN apt-key adv --keyserver pgp.mit.edu --recv-keys 5072E1F5 - -RUN apt-get update && apt-get install -y \ - build-essential \ - debhelper \ - dh-exec \ - dh-autoreconf \ - autotools-dev \ - devscripts \ - dput \ - vim \ - quilt \ - openssh-client \ - sendmail \ - wget - -RUN echo 'mysql-server mysql-server/root_password password ' | debconf-set-selections -RUN echo 'mysql-server mysql-server/root_password_again password ' | debconf-set-selections - -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ - apache2 \ - mysql-server \ - libcurl4-openssl-dev \ - quanta-agent \ - libmonikor-dev - -RUN echo 'deb http://packages.dotdeb.org wheezy-php56 all' > /etc/apt/sources.list.d/dotdeb.list - -RUN apt-get update && apt-get install -y \ - php5-dev \ - php5-gd \ - php5-curl \ - php5-intl \ - php5-json \ - php5-mcrypt \ - php5-dbg \ - php5-mysql \ - libapache2-mod-php5 diff --git a/packager/debian7/build_package.sh b/packager/debian7/build_package.sh deleted file mode 100755 index f4446b6..0000000 --- a/packager/debian7/build_package.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -package=$1 -basedir=/php-module -packagerdir=/php-module/packager/debian7 -builddir=${packagerdir}/${package}/build -outdir=${packagerdir}/${package}/pkg - -if [ -z "$package" ]; then - echo "Usage: build_package.sh " - exit 1 -fi - -echo "Creating build directory..." -rm -Rf ${builddir} -mkdir -p /packager -cp -r ${basedir}/extension ${builddir} -cp -r ${packagerdir}/${package}/debian ${builddir} -cd ${builddir} - - -echo "Building package..." -debuild -us -uc - -echo "Delivering packages" -rm -Rf ${outdir} -mkdir -p ${outdir} -cp -v /packager/php* ${outdir} - -echo "Testing package..." -dpkg -i ${outdir}/*.deb -php5enmod quanta_mon || echo "No php5enmod" -php -i | grep quanta diff --git a/packager/debian7/dput.cf b/packager/debian7/dput.cf deleted file mode 100644 index 7616088..0000000 --- a/packager/debian7/dput.cf +++ /dev/null @@ -1,22 +0,0 @@ -# Example dput.cf that defines the host that can be used -# with dput for uploading. - -[DEFAULT] -login = * -method = local -hash = md5 -allow_unsigned_uploads = 1 -allow_dcut = 0 -run_lintian = 0 -run_dinstall = 0 -check_version = 0 -scp_compress = 0 -allowed_distributions = (?!UNRELEASED) - -[quanta] -login = korrigan -fqdn = pkg-2.quanta.gr -method = scp -incoming = /data/pkg/apt/mini-dinstall/incoming -allow_dcut = 1 -allowed_distributions = (?!UNRELEASED|.*-security) diff --git a/packager/debian7/php54-quanta-mon/debian/changelog b/packager/debian7/php54-quanta-mon/debian/changelog deleted file mode 100644 index d8bc0e8..0000000 --- a/packager/debian7/php54-quanta-mon/debian/changelog +++ /dev/null @@ -1,11 +0,0 @@ -php54-quanta-mon (1.2.2) quanta; urgency=medium - - * Fix a (weird) bug with execute_data and prev_execute_data on PHP 5.5 and PHP 5.6 - - -- Matthieu ROSINSKI Wed, 25 Oct 2016 16:12:42 +0100 - -php54-quanta-mon (1.2.1) quanta; urgency=medium - - * Initial release. - - -- Matthieu ROSINSKI Thu, 10 Mar 2016 14:56:19 +0100 diff --git a/packager/debian7/php54-quanta-mon/debian/compat b/packager/debian7/php54-quanta-mon/debian/compat deleted file mode 100644 index ec63514..0000000 --- a/packager/debian7/php54-quanta-mon/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/packager/debian7/php54-quanta-mon/debian/control b/packager/debian7/php54-quanta-mon/debian/control deleted file mode 100644 index bc0c7e8..0000000 --- a/packager/debian7/php54-quanta-mon/debian/control +++ /dev/null @@ -1,16 +0,0 @@ -Maintainer: Matthieu ROSINSKI -Section: php -Priority: optional -Build-Depends: debhelper (>= 9), dh-exec, dh-autoreconf, autotools-dev, libmonikor-dev, php5-dev -Standards-Version: 3.9.5 -Source: php54-quanta-mon - -Package: php54-quanta-mon -Provides: php-quanta-mon -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libmonikor (>= 1.0.0), php5-common (>= 5.4.0), phpapi-20100525, ucf -Recommends: monikor -Pre-Depends: ${misc:Pre-Depends} -Description: This PHP extension provides a profiler for Magento - The extension will trigger on custom http headers and send metrics to - Quanta over the quanta-agent. diff --git a/packager/debian7/php54-quanta-mon/debian/copyright b/packager/debian7/php54-quanta-mon/debian/copyright deleted file mode 100644 index c664af7..0000000 --- a/packager/debian7/php54-quanta-mon/debian/copyright +++ /dev/null @@ -1,348 +0,0 @@ -Copyright Quanta-Computing 2016 - -1. Preamble -This Agreement, signed on Mar 14, 2016 (hereinafter: Effective Date) governs -the relationship between the client, a Business Entity, (hereinafter: Licensee) -and Quanta-Computing, a duly registered company in whose principal place of -business is 41 rue Saint-Augustin, Paris, France (hereinafter: Licensor). This -Agreement sets the terms, rights, restrictions and obligations on using -php-quanta-mon (hereinafter: The Software) created and owned by Licensor, as -detailed herein. - -2. License Grant -Licensor hereby grants Licensee a Sublicensable, Non-assignable & -non-transferable, Pepetual, Non-commercial, Including the rights to distribute -derivative works, Non-exclusive license, all with accordance with the terms set -forth and other legal restrictions set forth in 3rd party software used while -running Software. - -2.1. Limited: Licensee may use Software for the purpose of: -2.1.1. Running Software on Licensee’s Website[s] and Server[s]; -2.1.2. Allowing 3rd Parties to run Software on Licensee’s Website[s] and Server[s]; -2.1.3. Publishing Software’s output to Licensee and 3rd Parties; -2.1.4. Distribute verbatim copies of Software’s output (including compiled binaries); -2.1.5. Modify Software to suit Licensee’s needs and specifications. - -2.2. This license is granted perpetually, as long as you do not materially breach it. - -2.3. Non Assignable & Non-Transferable -Licensee may not assign or transfer his rights and duties under this license. - -2.4. Non-Commercial -Licensee may not use Software for commercial purposes. for the purpose of this -license, commercial purposes means that a 3rd party has to pay in order to -access Software or that the Website that runs Software is behind a paywall. - -2.5. Including the right to Distribute Derivative Works -Licensee may create and distribute derivative works based on Software, including -amending Software’s source code, modifying it, integrating it into a larger -work or removing portions of Software, as long as credit to the Licensor is -granted and that redistribution is made under the terms of this license. - -2.6. [Multi-]Site -Licensee may use Software on unlimited server[s] and unlimited website[s], for -Licensee’s websites only. - -3. Term & Termination -The Term of this license shall be until terminated. Licensor may terminate this -Agreement, including Licensee’s license in the case where Licensee : - -3.1. became insolvent or otherwise entered into any liquidation process; or -3.2. exported The Software to any jurisdiction where licensor may not enforce -his rights under this agreements in; or -3.3. Licensee was in breach of any of this license's terms and conditions and -such breach was not cured, immediately upon notification; or -3.4 Licensee in breach of any of the terms of clause 2 to this license; or -3.5. Licensee otherwise entered into any arrangement which caused Licensor to -be unable to enforce his rights under this License. - -4. Upgrades, Updates and Fixes -Licensor may provide Licensee, from time to time, with Upgrades, Updates or -Fixes, as detailed herein and according to his sole discretion. Licensor shall -provide any update or Fix free of charge; however, nothing in this Agreement -shall require Licensor to provide Updates or Fixes. - -4.1. Upgrades -For the purpose of this license, an Upgrade shall be a material amendment in -The Software, which contains new features and or major performance improvements -and shall be marked as a new version number. For example, should Licensee purchase -The Software under version 1.X.X, an upgrade shall commence under number 2.0.0. - -4.2. Updates -For the purpose of this license, an update shall be a minor amendment in The -Software, which may contain new features or minor improvements and shall be -marked as a new sub-version number. For example, should Licensee purchase The -Software under version 1.1.X, an upgrade shall commence under number 1.2.0. - -4.3. Fix -For the purpose of this license, a fix shall be a minor amendment in The -Software, intended to remove bugs or alter minor features which impair the -The Software's functionality. A fix shall be marked as a new sub-sub-version -number. For example, should Licensee purchase Software under version 1.1.1, an -upgrade shall commence under number 1.1.2. - -5. Support -Software is provided under an AS-IS basis and without any support, updates or -maintenance. Nothing in this Agreement shall require Licensor to provide Licensee -with support or fixes to any bug, failure, mis-performance or other defect in -The Software. - -5.1. Bug Notification -Licensee may provide Licensor of details regarding any bug, defect or failure -in The Software promptly and with no delay from such event; Licensee shall -comply with Licensor's request for information regarding bugs, defects or -failures and furnish him with information, screenshots and try to reproduce -such bugs, defects or failures. - -5.2. Feature Request -Licensee may request additional features in Software, provided, however, that -(i) Licensee shall waive any claim or right in such feature should feature be -developed by Licensor; (ii) Licensee shall be prohibited from developing the -feature, or disclose such feature request, or feature, to any 3rd party directly -competing with Licensor or any 3rd party which may be, following the development -of such feature, in direct competition with Licensor; (iii) Licensee warrants -that feature does not infringe any 3rd party patent, trademark, trade-secret or -any other intellectual property right; and (iv) Licensee developed, envisioned -or created the feature solely by himself. - -6. Liability -To the extent permitted under Law, The Software is provided under an AS-IS basis. -Licensor shall never, and without any limit, be liable for any damage, cost, -expense or any other payment incurred by Licensee as a result of Software’s -actions, failure, bugs and/or any other interaction between The Software and -Licensee’s end-equipment, computers, other software or any 3rd party, -end-equipment, computer or services. Moreover, Licensor shall never be liable -for any defect in source code written by Licensee when relying on The Software -or using The Software’s source code. - -7. Warranty - -7.1. Intellectual Property -Licensor hereby warrants that The Software does not violate or infringe any 3rd -party claims in regards to intellectual property, patents and/or trademarks and -that to the best of its knowledge no legal action has been taken against it for -any infringement or violation of any 3rd party intellectual property rights. - -7.2. No-Warranty -The Software is provided without any warranty; Licensor hereby disclaims any -warranty that The Software shall be error free, without defects or code which -may cause damage to Licensee’s computers or to Licensee, and that Software -shall be functional. Licensee shall be solely liable to any damage, defect or -loss incurred as a result of operating software and undertake the risks -contained in running The Software on License’s Server[s] and Website[s]. - -7.3. Prior Inspection -Licensee hereby states that he inspected The Software thoroughly and found -it satisfactory and adequate to his needs, that it does not interfere with his -regular operation and that it does meet the standards and scope of his computer -systems and architecture. Licensee found that The Software interacts with his -development, website and server environment and that it does not infringe any of -End User License Agreement of any software Licensee may use in performing his -services. Licensee hereby waives any claims regarding The Software's -incompatibility, performance, results and features, and warrants that he -inspected the The Software. - -8. No Refunds -Licensee warrants that he inspected The Software according to clause 7(c) and -that it is adequate to his needs. Accordingly, as The Software is intangible -goods, Licensee shall not be, ever, entitled to any refund, rebate, compensation -or restitution for any reason whatsoever, even if The Software contains -material flaws. - -9. Indemnification -Licensee hereby warrants to hold Licensor harmless and indemnify Licensor for -any lawsuit brought against it in regards to Licensee’s use of The Software in -means that violate, breach or otherwise circumvent this license, Licensor's -intellectual property rights or Licensor's title in The Software. Licensor shall -promptly notify Licensee in case of such legal action and request Licensee’s -consent prior to any settlement in relation to such lawsuit or claim. - -10. Governing Law, Jurisdiction -Licensee hereby agrees not to initiate class-action lawsuits against Licensor -in relation to this license and to compensate Licensor for any legal fees, cost -or attorney fees should any claim brought by Licensee against Licensor be -denied, in part or in full. - -11. Other software used - -This software is a derivative work of xhprof, delivered under the Apache -license version 2.0. You will find below a copy of this license. - - -Apache License - - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS diff --git a/packager/debian7/php54-quanta-mon/debian/rules b/packager/debian7/php54-quanta-mon/debian/rules deleted file mode 100644 index 4dd8525..0000000 --- a/packager/debian7/php54-quanta-mon/debian/rules +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/make -f - -build: - phpize - dh_build - -override_dh_auto_install: - $(MAKE) INSTALL_ROOT=$$(pwd)/debian/php54-quanta-mon install - install -D -m 0644 quanta_mon.ini debian/php54-quanta-mon/etc/php5/mods-available/quanta_mon.ini - -override_dh_shlibdeps: - dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info - -%: - dh $@ diff --git a/packager/debian7/php54-quanta-mon/debian/source/format b/packager/debian7/php54-quanta-mon/debian/source/format deleted file mode 100644 index 89ae9db..0000000 --- a/packager/debian7/php54-quanta-mon/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (native) diff --git a/packager/debian7/php55-quanta-mon/debian/changelog b/packager/debian7/php55-quanta-mon/debian/changelog deleted file mode 100644 index 541226d..0000000 --- a/packager/debian7/php55-quanta-mon/debian/changelog +++ /dev/null @@ -1,11 +0,0 @@ -php55-quanta-mon (1.2.2) quanta; urgency=medium - - * Fix a (weird) bug with execute_data and prev_execute_data on PHP 5.5 and PHP 5.6 - - -- Matthieu ROSINSKI Wed, 25 Oct 2016 16:12:42 +0100 - -php55-quanta-mon (1.2.1) quanta; urgency=medium - - * Initial release. - - -- Matthieu ROSINSKI Thu, 10 Mar 2016 14:56:19 +0100 diff --git a/packager/debian7/php55-quanta-mon/debian/compat b/packager/debian7/php55-quanta-mon/debian/compat deleted file mode 100644 index ec63514..0000000 --- a/packager/debian7/php55-quanta-mon/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/packager/debian7/php55-quanta-mon/debian/control b/packager/debian7/php55-quanta-mon/debian/control deleted file mode 100644 index a1866b2..0000000 --- a/packager/debian7/php55-quanta-mon/debian/control +++ /dev/null @@ -1,16 +0,0 @@ -Maintainer: Matthieu ROSINSKI -Section: php -Priority: optional -Build-Depends: debhelper (>= 9), dh-exec, dh-autoreconf, autotools-dev, libmonikor-dev, php5-dev -Standards-Version: 3.9.5 -Source: php55-quanta-mon - -Package: php55-quanta-mon -Provides: php-quanta-mon -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libmonikor (>= 1.0.0), php5-common (>= 5.5.0), phpapi-20121212, ucf -Recommends: monikor -Pre-Depends: ${misc:Pre-Depends} -Description: This PHP extension provides a profiler for Magento - The extension will trigger on custom http headers and send metrics to - Quanta over the quanta-agent. diff --git a/packager/debian7/php55-quanta-mon/debian/copyright b/packager/debian7/php55-quanta-mon/debian/copyright deleted file mode 100644 index c664af7..0000000 --- a/packager/debian7/php55-quanta-mon/debian/copyright +++ /dev/null @@ -1,348 +0,0 @@ -Copyright Quanta-Computing 2016 - -1. Preamble -This Agreement, signed on Mar 14, 2016 (hereinafter: Effective Date) governs -the relationship between the client, a Business Entity, (hereinafter: Licensee) -and Quanta-Computing, a duly registered company in whose principal place of -business is 41 rue Saint-Augustin, Paris, France (hereinafter: Licensor). This -Agreement sets the terms, rights, restrictions and obligations on using -php-quanta-mon (hereinafter: The Software) created and owned by Licensor, as -detailed herein. - -2. License Grant -Licensor hereby grants Licensee a Sublicensable, Non-assignable & -non-transferable, Pepetual, Non-commercial, Including the rights to distribute -derivative works, Non-exclusive license, all with accordance with the terms set -forth and other legal restrictions set forth in 3rd party software used while -running Software. - -2.1. Limited: Licensee may use Software for the purpose of: -2.1.1. Running Software on Licensee’s Website[s] and Server[s]; -2.1.2. Allowing 3rd Parties to run Software on Licensee’s Website[s] and Server[s]; -2.1.3. Publishing Software’s output to Licensee and 3rd Parties; -2.1.4. Distribute verbatim copies of Software’s output (including compiled binaries); -2.1.5. Modify Software to suit Licensee’s needs and specifications. - -2.2. This license is granted perpetually, as long as you do not materially breach it. - -2.3. Non Assignable & Non-Transferable -Licensee may not assign or transfer his rights and duties under this license. - -2.4. Non-Commercial -Licensee may not use Software for commercial purposes. for the purpose of this -license, commercial purposes means that a 3rd party has to pay in order to -access Software or that the Website that runs Software is behind a paywall. - -2.5. Including the right to Distribute Derivative Works -Licensee may create and distribute derivative works based on Software, including -amending Software’s source code, modifying it, integrating it into a larger -work or removing portions of Software, as long as credit to the Licensor is -granted and that redistribution is made under the terms of this license. - -2.6. [Multi-]Site -Licensee may use Software on unlimited server[s] and unlimited website[s], for -Licensee’s websites only. - -3. Term & Termination -The Term of this license shall be until terminated. Licensor may terminate this -Agreement, including Licensee’s license in the case where Licensee : - -3.1. became insolvent or otherwise entered into any liquidation process; or -3.2. exported The Software to any jurisdiction where licensor may not enforce -his rights under this agreements in; or -3.3. Licensee was in breach of any of this license's terms and conditions and -such breach was not cured, immediately upon notification; or -3.4 Licensee in breach of any of the terms of clause 2 to this license; or -3.5. Licensee otherwise entered into any arrangement which caused Licensor to -be unable to enforce his rights under this License. - -4. Upgrades, Updates and Fixes -Licensor may provide Licensee, from time to time, with Upgrades, Updates or -Fixes, as detailed herein and according to his sole discretion. Licensor shall -provide any update or Fix free of charge; however, nothing in this Agreement -shall require Licensor to provide Updates or Fixes. - -4.1. Upgrades -For the purpose of this license, an Upgrade shall be a material amendment in -The Software, which contains new features and or major performance improvements -and shall be marked as a new version number. For example, should Licensee purchase -The Software under version 1.X.X, an upgrade shall commence under number 2.0.0. - -4.2. Updates -For the purpose of this license, an update shall be a minor amendment in The -Software, which may contain new features or minor improvements and shall be -marked as a new sub-version number. For example, should Licensee purchase The -Software under version 1.1.X, an upgrade shall commence under number 1.2.0. - -4.3. Fix -For the purpose of this license, a fix shall be a minor amendment in The -Software, intended to remove bugs or alter minor features which impair the -The Software's functionality. A fix shall be marked as a new sub-sub-version -number. For example, should Licensee purchase Software under version 1.1.1, an -upgrade shall commence under number 1.1.2. - -5. Support -Software is provided under an AS-IS basis and without any support, updates or -maintenance. Nothing in this Agreement shall require Licensor to provide Licensee -with support or fixes to any bug, failure, mis-performance or other defect in -The Software. - -5.1. Bug Notification -Licensee may provide Licensor of details regarding any bug, defect or failure -in The Software promptly and with no delay from such event; Licensee shall -comply with Licensor's request for information regarding bugs, defects or -failures and furnish him with information, screenshots and try to reproduce -such bugs, defects or failures. - -5.2. Feature Request -Licensee may request additional features in Software, provided, however, that -(i) Licensee shall waive any claim or right in such feature should feature be -developed by Licensor; (ii) Licensee shall be prohibited from developing the -feature, or disclose such feature request, or feature, to any 3rd party directly -competing with Licensor or any 3rd party which may be, following the development -of such feature, in direct competition with Licensor; (iii) Licensee warrants -that feature does not infringe any 3rd party patent, trademark, trade-secret or -any other intellectual property right; and (iv) Licensee developed, envisioned -or created the feature solely by himself. - -6. Liability -To the extent permitted under Law, The Software is provided under an AS-IS basis. -Licensor shall never, and without any limit, be liable for any damage, cost, -expense or any other payment incurred by Licensee as a result of Software’s -actions, failure, bugs and/or any other interaction between The Software and -Licensee’s end-equipment, computers, other software or any 3rd party, -end-equipment, computer or services. Moreover, Licensor shall never be liable -for any defect in source code written by Licensee when relying on The Software -or using The Software’s source code. - -7. Warranty - -7.1. Intellectual Property -Licensor hereby warrants that The Software does not violate or infringe any 3rd -party claims in regards to intellectual property, patents and/or trademarks and -that to the best of its knowledge no legal action has been taken against it for -any infringement or violation of any 3rd party intellectual property rights. - -7.2. No-Warranty -The Software is provided without any warranty; Licensor hereby disclaims any -warranty that The Software shall be error free, without defects or code which -may cause damage to Licensee’s computers or to Licensee, and that Software -shall be functional. Licensee shall be solely liable to any damage, defect or -loss incurred as a result of operating software and undertake the risks -contained in running The Software on License’s Server[s] and Website[s]. - -7.3. Prior Inspection -Licensee hereby states that he inspected The Software thoroughly and found -it satisfactory and adequate to his needs, that it does not interfere with his -regular operation and that it does meet the standards and scope of his computer -systems and architecture. Licensee found that The Software interacts with his -development, website and server environment and that it does not infringe any of -End User License Agreement of any software Licensee may use in performing his -services. Licensee hereby waives any claims regarding The Software's -incompatibility, performance, results and features, and warrants that he -inspected the The Software. - -8. No Refunds -Licensee warrants that he inspected The Software according to clause 7(c) and -that it is adequate to his needs. Accordingly, as The Software is intangible -goods, Licensee shall not be, ever, entitled to any refund, rebate, compensation -or restitution for any reason whatsoever, even if The Software contains -material flaws. - -9. Indemnification -Licensee hereby warrants to hold Licensor harmless and indemnify Licensor for -any lawsuit brought against it in regards to Licensee’s use of The Software in -means that violate, breach or otherwise circumvent this license, Licensor's -intellectual property rights or Licensor's title in The Software. Licensor shall -promptly notify Licensee in case of such legal action and request Licensee’s -consent prior to any settlement in relation to such lawsuit or claim. - -10. Governing Law, Jurisdiction -Licensee hereby agrees not to initiate class-action lawsuits against Licensor -in relation to this license and to compensate Licensor for any legal fees, cost -or attorney fees should any claim brought by Licensee against Licensor be -denied, in part or in full. - -11. Other software used - -This software is a derivative work of xhprof, delivered under the Apache -license version 2.0. You will find below a copy of this license. - - -Apache License - - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS diff --git a/packager/debian7/php55-quanta-mon/debian/rules b/packager/debian7/php55-quanta-mon/debian/rules deleted file mode 100644 index e5104db..0000000 --- a/packager/debian7/php55-quanta-mon/debian/rules +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/make -f - -build: - phpize - dh_build - -override_dh_auto_install: - $(MAKE) INSTALL_ROOT=$$(pwd)/debian/php55-quanta-mon install - install -D -m 0644 quanta_mon.ini debian/php55-quanta-mon/etc/php5/mods-available/quanta_mon.ini - -override_dh_shlibdeps: - dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info - -%: - dh $@ diff --git a/packager/debian7/php55-quanta-mon/debian/source/format b/packager/debian7/php55-quanta-mon/debian/source/format deleted file mode 100644 index 89ae9db..0000000 --- a/packager/debian7/php55-quanta-mon/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (native) diff --git a/packager/debian7/php56-quanta-mon/debian/changelog b/packager/debian7/php56-quanta-mon/debian/changelog deleted file mode 100644 index 268de2b..0000000 --- a/packager/debian7/php56-quanta-mon/debian/changelog +++ /dev/null @@ -1,11 +0,0 @@ -php56-quanta-mon (1.2.2) quanta; urgency=medium - - * Fix a (weird) bug with execute_data and prev_execute_data on PHP 5.5 and PHP 5.6 - - -- Matthieu ROSINSKI Wed, 25 Oct 2016 16:12:42 +0100 - -php56-quanta-mon (1.2.1) quanta; urgency=medium - - * Initial release. - - -- Matthieu ROSINSKI Thu, 10 Mar 2016 14:56:19 +0100 diff --git a/packager/debian7/php56-quanta-mon/debian/compat b/packager/debian7/php56-quanta-mon/debian/compat deleted file mode 100644 index ec63514..0000000 --- a/packager/debian7/php56-quanta-mon/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/packager/debian7/php56-quanta-mon/debian/control b/packager/debian7/php56-quanta-mon/debian/control deleted file mode 100644 index cb6abf5..0000000 --- a/packager/debian7/php56-quanta-mon/debian/control +++ /dev/null @@ -1,16 +0,0 @@ -Maintainer: Matthieu ROSINSKI -Section: php -Priority: optional -Build-Depends: debhelper (>= 9), dh-exec, dh-autoreconf, autotools-dev, libmonikor-dev, php5-dev -Standards-Version: 3.9.5 -Source: php56-quanta-mon - -Package: php56-quanta-mon -Provides: php-quanta-mon -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libmonikor (>= 1.0.0), php5-common (>= 5.6.0), phpapi-20131226, ucf -Recommends: monikor -Pre-Depends: ${misc:Pre-Depends} -Description: This PHP extension provides a profiler for Magento - The extension will trigger on custom http headers and send metrics to - Quanta over the quanta-agent. diff --git a/packager/debian7/php56-quanta-mon/debian/copyright b/packager/debian7/php56-quanta-mon/debian/copyright deleted file mode 100644 index c664af7..0000000 --- a/packager/debian7/php56-quanta-mon/debian/copyright +++ /dev/null @@ -1,348 +0,0 @@ -Copyright Quanta-Computing 2016 - -1. Preamble -This Agreement, signed on Mar 14, 2016 (hereinafter: Effective Date) governs -the relationship between the client, a Business Entity, (hereinafter: Licensee) -and Quanta-Computing, a duly registered company in whose principal place of -business is 41 rue Saint-Augustin, Paris, France (hereinafter: Licensor). This -Agreement sets the terms, rights, restrictions and obligations on using -php-quanta-mon (hereinafter: The Software) created and owned by Licensor, as -detailed herein. - -2. License Grant -Licensor hereby grants Licensee a Sublicensable, Non-assignable & -non-transferable, Pepetual, Non-commercial, Including the rights to distribute -derivative works, Non-exclusive license, all with accordance with the terms set -forth and other legal restrictions set forth in 3rd party software used while -running Software. - -2.1. Limited: Licensee may use Software for the purpose of: -2.1.1. Running Software on Licensee’s Website[s] and Server[s]; -2.1.2. Allowing 3rd Parties to run Software on Licensee’s Website[s] and Server[s]; -2.1.3. Publishing Software’s output to Licensee and 3rd Parties; -2.1.4. Distribute verbatim copies of Software’s output (including compiled binaries); -2.1.5. Modify Software to suit Licensee’s needs and specifications. - -2.2. This license is granted perpetually, as long as you do not materially breach it. - -2.3. Non Assignable & Non-Transferable -Licensee may not assign or transfer his rights and duties under this license. - -2.4. Non-Commercial -Licensee may not use Software for commercial purposes. for the purpose of this -license, commercial purposes means that a 3rd party has to pay in order to -access Software or that the Website that runs Software is behind a paywall. - -2.5. Including the right to Distribute Derivative Works -Licensee may create and distribute derivative works based on Software, including -amending Software’s source code, modifying it, integrating it into a larger -work or removing portions of Software, as long as credit to the Licensor is -granted and that redistribution is made under the terms of this license. - -2.6. [Multi-]Site -Licensee may use Software on unlimited server[s] and unlimited website[s], for -Licensee’s websites only. - -3. Term & Termination -The Term of this license shall be until terminated. Licensor may terminate this -Agreement, including Licensee’s license in the case where Licensee : - -3.1. became insolvent or otherwise entered into any liquidation process; or -3.2. exported The Software to any jurisdiction where licensor may not enforce -his rights under this agreements in; or -3.3. Licensee was in breach of any of this license's terms and conditions and -such breach was not cured, immediately upon notification; or -3.4 Licensee in breach of any of the terms of clause 2 to this license; or -3.5. Licensee otherwise entered into any arrangement which caused Licensor to -be unable to enforce his rights under this License. - -4. Upgrades, Updates and Fixes -Licensor may provide Licensee, from time to time, with Upgrades, Updates or -Fixes, as detailed herein and according to his sole discretion. Licensor shall -provide any update or Fix free of charge; however, nothing in this Agreement -shall require Licensor to provide Updates or Fixes. - -4.1. Upgrades -For the purpose of this license, an Upgrade shall be a material amendment in -The Software, which contains new features and or major performance improvements -and shall be marked as a new version number. For example, should Licensee purchase -The Software under version 1.X.X, an upgrade shall commence under number 2.0.0. - -4.2. Updates -For the purpose of this license, an update shall be a minor amendment in The -Software, which may contain new features or minor improvements and shall be -marked as a new sub-version number. For example, should Licensee purchase The -Software under version 1.1.X, an upgrade shall commence under number 1.2.0. - -4.3. Fix -For the purpose of this license, a fix shall be a minor amendment in The -Software, intended to remove bugs or alter minor features which impair the -The Software's functionality. A fix shall be marked as a new sub-sub-version -number. For example, should Licensee purchase Software under version 1.1.1, an -upgrade shall commence under number 1.1.2. - -5. Support -Software is provided under an AS-IS basis and without any support, updates or -maintenance. Nothing in this Agreement shall require Licensor to provide Licensee -with support or fixes to any bug, failure, mis-performance or other defect in -The Software. - -5.1. Bug Notification -Licensee may provide Licensor of details regarding any bug, defect or failure -in The Software promptly and with no delay from such event; Licensee shall -comply with Licensor's request for information regarding bugs, defects or -failures and furnish him with information, screenshots and try to reproduce -such bugs, defects or failures. - -5.2. Feature Request -Licensee may request additional features in Software, provided, however, that -(i) Licensee shall waive any claim or right in such feature should feature be -developed by Licensor; (ii) Licensee shall be prohibited from developing the -feature, or disclose such feature request, or feature, to any 3rd party directly -competing with Licensor or any 3rd party which may be, following the development -of such feature, in direct competition with Licensor; (iii) Licensee warrants -that feature does not infringe any 3rd party patent, trademark, trade-secret or -any other intellectual property right; and (iv) Licensee developed, envisioned -or created the feature solely by himself. - -6. Liability -To the extent permitted under Law, The Software is provided under an AS-IS basis. -Licensor shall never, and without any limit, be liable for any damage, cost, -expense or any other payment incurred by Licensee as a result of Software’s -actions, failure, bugs and/or any other interaction between The Software and -Licensee’s end-equipment, computers, other software or any 3rd party, -end-equipment, computer or services. Moreover, Licensor shall never be liable -for any defect in source code written by Licensee when relying on The Software -or using The Software’s source code. - -7. Warranty - -7.1. Intellectual Property -Licensor hereby warrants that The Software does not violate or infringe any 3rd -party claims in regards to intellectual property, patents and/or trademarks and -that to the best of its knowledge no legal action has been taken against it for -any infringement or violation of any 3rd party intellectual property rights. - -7.2. No-Warranty -The Software is provided without any warranty; Licensor hereby disclaims any -warranty that The Software shall be error free, without defects or code which -may cause damage to Licensee’s computers or to Licensee, and that Software -shall be functional. Licensee shall be solely liable to any damage, defect or -loss incurred as a result of operating software and undertake the risks -contained in running The Software on License’s Server[s] and Website[s]. - -7.3. Prior Inspection -Licensee hereby states that he inspected The Software thoroughly and found -it satisfactory and adequate to his needs, that it does not interfere with his -regular operation and that it does meet the standards and scope of his computer -systems and architecture. Licensee found that The Software interacts with his -development, website and server environment and that it does not infringe any of -End User License Agreement of any software Licensee may use in performing his -services. Licensee hereby waives any claims regarding The Software's -incompatibility, performance, results and features, and warrants that he -inspected the The Software. - -8. No Refunds -Licensee warrants that he inspected The Software according to clause 7(c) and -that it is adequate to his needs. Accordingly, as The Software is intangible -goods, Licensee shall not be, ever, entitled to any refund, rebate, compensation -or restitution for any reason whatsoever, even if The Software contains -material flaws. - -9. Indemnification -Licensee hereby warrants to hold Licensor harmless and indemnify Licensor for -any lawsuit brought against it in regards to Licensee’s use of The Software in -means that violate, breach or otherwise circumvent this license, Licensor's -intellectual property rights or Licensor's title in The Software. Licensor shall -promptly notify Licensee in case of such legal action and request Licensee’s -consent prior to any settlement in relation to such lawsuit or claim. - -10. Governing Law, Jurisdiction -Licensee hereby agrees not to initiate class-action lawsuits against Licensor -in relation to this license and to compensate Licensor for any legal fees, cost -or attorney fees should any claim brought by Licensee against Licensor be -denied, in part or in full. - -11. Other software used - -This software is a derivative work of xhprof, delivered under the Apache -license version 2.0. You will find below a copy of this license. - - -Apache License - - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS diff --git a/packager/debian7/php56-quanta-mon/debian/rules b/packager/debian7/php56-quanta-mon/debian/rules deleted file mode 100644 index c3f467e..0000000 --- a/packager/debian7/php56-quanta-mon/debian/rules +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/make -f - -build: - phpize - dh_build - -override_dh_auto_install: - $(MAKE) INSTALL_ROOT=$$(pwd)/debian/php56-quanta-mon install - install -D -m 0644 quanta_mon.ini debian/php56-quanta-mon/etc/php5/mods-available/quanta_mon.ini - -override_dh_shlibdeps: - dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info - -%: - dh $@ diff --git a/packager/debian7/php56-quanta-mon/debian/source/format b/packager/debian7/php56-quanta-mon/debian/source/format deleted file mode 100644 index 89ae9db..0000000 --- a/packager/debian7/php56-quanta-mon/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (native) diff --git a/packager/debian8-php70.dockerfile b/packager/debian8-php70.dockerfile deleted file mode 100644 index 9694230..0000000 --- a/packager/debian8-php70.dockerfile +++ /dev/null @@ -1,54 +0,0 @@ -FROM debian:jessie -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN sed -i 's/httpredir\.debian\.org/ftp.fr.debian.org/g' /etc/apt/sources.list -RUN apt-get update && apt-get install -y curl -RUN echo 'deb http://apt.quanta.gr quanta/' > /etc/apt/sources.list.d/quanta.list -RUN echo 'deb http://packages.dotdeb.org jessie all' > /etc/apt/sources.list.d/dotdeb.list -RUN echo 'deb http://repo.mysql.com/apt/debian jessie mysql-5.6' > /etc/apt/sources.list.d/mysql.list -RUN curl -s https://www.quanta-monitoring.com/quanta-repo-key.gpg -o - | apt-key add - -RUN curl -s https://www.dotdeb.org/dotdeb.gpg -o - | apt-key add - -RUN apt-key adv --keyserver pgp.mit.edu --recv-keys 5072E1F5 - -RUN apt-get update && apt-get install -y \ - build-essential \ - debhelper \ - dh-exec \ - dh-autoreconf \ - autotools-dev \ - devscripts \ - dput \ - vim \ - quilt \ - openssh-client \ - sendmail \ - wget - -RUN echo 'mysql-server mysql-server/root_password password ' | debconf-set-selections -RUN echo 'mysql-server mysql-server/root_password_again password ' | debconf-set-selections - -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ - apache2 \ - mysql-server \ - libcurl4-openssl-dev \ - quanta-agent \ - libmonikor-dev - -RUN apt-get update && apt-get install -y \ - libapache2-mod-php7.0 \ - php7.0-dev \ - php7.0-curl \ - php7.0-gd \ - php7.0-intl \ - php7.0-json \ - php7.0-mcrypt \ - php7.0-mysql \ - php7.0-mbstring \ - php7.0-xml \ - php7.0-zip - - -#ORO specific -RUN apt-get update && apt-get install -y nodejs -RUN curl -s https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer -RUN /usr/local/bin/composer global require "fxp/composer-asset-plugin" diff --git a/packager/debian8-php71.dockerfile b/packager/debian8-php71.dockerfile deleted file mode 100644 index b3c8f46..0000000 --- a/packager/debian8-php71.dockerfile +++ /dev/null @@ -1,57 +0,0 @@ -FROM debian:jessie -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN sed -i 's/httpredir\.debian\.org/ftp.fr.debian.org/g' /etc/apt/sources.list -RUN apt-get update && apt-get install -y curl -RUN echo 'deb http://apt.quanta.gr quanta/' > /etc/apt/sources.list.d/quanta.list -RUN echo 'deb http://packages.dotdeb.org jessie all' > /etc/apt/sources.list.d/dotdeb.list -RUN echo 'deb http://repo.mysql.com/apt/debian jessie mysql-5.6' > /etc/apt/sources.list.d/mysql.list -RUN curl -s https://www.quanta-monitoring.com/quanta-repo-key.gpg -o - | apt-key add - -RUN curl -s https://www.dotdeb.org/dotdeb.gpg -o - | apt-key add - -RUN apt-key adv --keyserver pgp.mit.edu --recv-keys 5072E1F5 - -RUN apt-get update && apt-get install -y \ - build-essential \ - debhelper \ - dh-exec \ - dh-autoreconf \ - autotools-dev \ - devscripts \ - dput \ - vim \ - quilt \ - openssh-client \ - sendmail \ - wget - -RUN echo 'mysql-server mysql-server/root_password password ' | debconf-set-selections -RUN echo 'mysql-server mysql-server/root_password_again password ' | debconf-set-selections - -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ - apache2 \ - mysql-server \ - libcurl4-openssl-dev \ - quanta-agent \ - libmonikor-dev - -RUN apt-get update && apt-get install -y apt-transport-https ca-certificates -RUN curl -s https://packages.sury.org/php/apt.gpg -o - | apt-key add - -RUN echo "deb https://packages.sury.org/php/ jessie main" > /etc/apt/sources.list.d/sury.list - -RUN apt-get update && apt-get install -y \ - libapache2-mod-php7.1 \ - php7.1-dev \ - php7.1-curl \ - php7.1-gd \ - php7.1-intl \ - php7.1-json \ - php7.1-mcrypt \ - php7.1-mysql \ - php7.1-mbstring \ - php7.1-xml \ - php7.1-zip - - -RUN apt-get update && apt-get install -y nodejs -RUN curl -s https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer -RUN /usr/local/bin/composer global require "fxp/composer-asset-plugin" diff --git a/packager/debian8/build_package.sh b/packager/debian8/build_package.sh deleted file mode 100755 index 48eb3a6..0000000 --- a/packager/debian8/build_package.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -package=$1 -basedir=/php-module -packagerdir=/php-module/packager/debian8 -outdir=${packagerdir}/${package}/pkg - -if [ -z "$package" ]; then - echo "Usage: build_package.sh " - exit 1 -fi - -echo "Creating build directory..." -rm -Rf ${packagedir}/${package}/build -cp -ar ${basedir}/extension ${packagerdir}/${package}/build -cp -ar ${packagerdir}/${package}/debian ${packagerdir}/${package}/build -cd ${packagerdir}/${package}/build - -echo "Building package..." -debuild -us -uc - -echo "Delivering packages" -rm -Rf ${outdir} -mkdir -p ${outdir} -cp -v ${packagerdir}/${package}/php* ${outdir} - -echo "Testing package..." -dpkg -i ${outdir}/*.deb -php5enmod quanta_mon || phpenmod quanta_mon || echo "No phpenmod" -php -i | grep quanta diff --git a/packager/debian8/dput.cf b/packager/debian8/dput.cf deleted file mode 100644 index 7616088..0000000 --- a/packager/debian8/dput.cf +++ /dev/null @@ -1,22 +0,0 @@ -# Example dput.cf that defines the host that can be used -# with dput for uploading. - -[DEFAULT] -login = * -method = local -hash = md5 -allow_unsigned_uploads = 1 -allow_dcut = 0 -run_lintian = 0 -run_dinstall = 0 -check_version = 0 -scp_compress = 0 -allowed_distributions = (?!UNRELEASED) - -[quanta] -login = korrigan -fqdn = pkg-2.quanta.gr -method = scp -incoming = /data/pkg/apt/mini-dinstall/incoming -allow_dcut = 1 -allowed_distributions = (?!UNRELEASED|.*-security) diff --git a/packager/debian8/php70-quanta-mon/debian/changelog b/packager/debian8/php70-quanta-mon/debian/changelog deleted file mode 100644 index eb6c346..0000000 --- a/packager/debian8/php70-quanta-mon/debian/changelog +++ /dev/null @@ -1,17 +0,0 @@ -php70-quanta-mon (1.3.0) quanta; urgency=medium - - * Add support for Orocommerce - - -- Matthieu ROSINSKI Tue, 20 Jun 2017 15:51:42 +0200 - -php70-quanta-mon (1.2.2) quanta; urgency=medium - - * Fix a (weird) bug with execute_data and prev_execute_data on PHP 5.5 and PHP 5.6 - - -- Matthieu ROSINSKI Wed, 25 Oct 2016 16:12:42 +0100 - -php70-quanta-mon (1.2.1) quanta; urgency=medium - - * Initial release. - - -- Matthieu ROSINSKI Thu, 10 Mar 2016 14:56:19 +0100 diff --git a/packager/debian8/php70-quanta-mon/debian/compat b/packager/debian8/php70-quanta-mon/debian/compat deleted file mode 100644 index ec63514..0000000 --- a/packager/debian8/php70-quanta-mon/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/packager/debian8/php70-quanta-mon/debian/control b/packager/debian8/php70-quanta-mon/debian/control deleted file mode 100644 index 26ad6fd..0000000 --- a/packager/debian8/php70-quanta-mon/debian/control +++ /dev/null @@ -1,16 +0,0 @@ -Maintainer: Matthieu ROSINSKI -Section: php -Priority: optional -Build-Depends: debhelper (>= 9), dh-exec, dh-autoreconf, autotools-dev, libmonikor-dev, php7.0-dev -Standards-Version: 3.9.6 -Source: php70-quanta-mon - -Package: php70-quanta-mon -Provides: php-quanta-mon -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libmonikor (>= 1.0.0), php7.0-common (>= 7.0.0), phpapi-20151012, ucf -Recommends: monikor -Pre-Depends: ${misc:Pre-Depends} -Description: This PHP extension provides a profiler for Magento - The extension will trigger on custom http headers and send metrics to - Quanta over the quanta-agent. diff --git a/packager/debian8/php70-quanta-mon/debian/copyright b/packager/debian8/php70-quanta-mon/debian/copyright deleted file mode 100644 index c664af7..0000000 --- a/packager/debian8/php70-quanta-mon/debian/copyright +++ /dev/null @@ -1,348 +0,0 @@ -Copyright Quanta-Computing 2016 - -1. Preamble -This Agreement, signed on Mar 14, 2016 (hereinafter: Effective Date) governs -the relationship between the client, a Business Entity, (hereinafter: Licensee) -and Quanta-Computing, a duly registered company in whose principal place of -business is 41 rue Saint-Augustin, Paris, France (hereinafter: Licensor). This -Agreement sets the terms, rights, restrictions and obligations on using -php-quanta-mon (hereinafter: The Software) created and owned by Licensor, as -detailed herein. - -2. License Grant -Licensor hereby grants Licensee a Sublicensable, Non-assignable & -non-transferable, Pepetual, Non-commercial, Including the rights to distribute -derivative works, Non-exclusive license, all with accordance with the terms set -forth and other legal restrictions set forth in 3rd party software used while -running Software. - -2.1. Limited: Licensee may use Software for the purpose of: -2.1.1. Running Software on Licensee’s Website[s] and Server[s]; -2.1.2. Allowing 3rd Parties to run Software on Licensee’s Website[s] and Server[s]; -2.1.3. Publishing Software’s output to Licensee and 3rd Parties; -2.1.4. Distribute verbatim copies of Software’s output (including compiled binaries); -2.1.5. Modify Software to suit Licensee’s needs and specifications. - -2.2. This license is granted perpetually, as long as you do not materially breach it. - -2.3. Non Assignable & Non-Transferable -Licensee may not assign or transfer his rights and duties under this license. - -2.4. Non-Commercial -Licensee may not use Software for commercial purposes. for the purpose of this -license, commercial purposes means that a 3rd party has to pay in order to -access Software or that the Website that runs Software is behind a paywall. - -2.5. Including the right to Distribute Derivative Works -Licensee may create and distribute derivative works based on Software, including -amending Software’s source code, modifying it, integrating it into a larger -work or removing portions of Software, as long as credit to the Licensor is -granted and that redistribution is made under the terms of this license. - -2.6. [Multi-]Site -Licensee may use Software on unlimited server[s] and unlimited website[s], for -Licensee’s websites only. - -3. Term & Termination -The Term of this license shall be until terminated. Licensor may terminate this -Agreement, including Licensee’s license in the case where Licensee : - -3.1. became insolvent or otherwise entered into any liquidation process; or -3.2. exported The Software to any jurisdiction where licensor may not enforce -his rights under this agreements in; or -3.3. Licensee was in breach of any of this license's terms and conditions and -such breach was not cured, immediately upon notification; or -3.4 Licensee in breach of any of the terms of clause 2 to this license; or -3.5. Licensee otherwise entered into any arrangement which caused Licensor to -be unable to enforce his rights under this License. - -4. Upgrades, Updates and Fixes -Licensor may provide Licensee, from time to time, with Upgrades, Updates or -Fixes, as detailed herein and according to his sole discretion. Licensor shall -provide any update or Fix free of charge; however, nothing in this Agreement -shall require Licensor to provide Updates or Fixes. - -4.1. Upgrades -For the purpose of this license, an Upgrade shall be a material amendment in -The Software, which contains new features and or major performance improvements -and shall be marked as a new version number. For example, should Licensee purchase -The Software under version 1.X.X, an upgrade shall commence under number 2.0.0. - -4.2. Updates -For the purpose of this license, an update shall be a minor amendment in The -Software, which may contain new features or minor improvements and shall be -marked as a new sub-version number. For example, should Licensee purchase The -Software under version 1.1.X, an upgrade shall commence under number 1.2.0. - -4.3. Fix -For the purpose of this license, a fix shall be a minor amendment in The -Software, intended to remove bugs or alter minor features which impair the -The Software's functionality. A fix shall be marked as a new sub-sub-version -number. For example, should Licensee purchase Software under version 1.1.1, an -upgrade shall commence under number 1.1.2. - -5. Support -Software is provided under an AS-IS basis and without any support, updates or -maintenance. Nothing in this Agreement shall require Licensor to provide Licensee -with support or fixes to any bug, failure, mis-performance or other defect in -The Software. - -5.1. Bug Notification -Licensee may provide Licensor of details regarding any bug, defect or failure -in The Software promptly and with no delay from such event; Licensee shall -comply with Licensor's request for information regarding bugs, defects or -failures and furnish him with information, screenshots and try to reproduce -such bugs, defects or failures. - -5.2. Feature Request -Licensee may request additional features in Software, provided, however, that -(i) Licensee shall waive any claim or right in such feature should feature be -developed by Licensor; (ii) Licensee shall be prohibited from developing the -feature, or disclose such feature request, or feature, to any 3rd party directly -competing with Licensor or any 3rd party which may be, following the development -of such feature, in direct competition with Licensor; (iii) Licensee warrants -that feature does not infringe any 3rd party patent, trademark, trade-secret or -any other intellectual property right; and (iv) Licensee developed, envisioned -or created the feature solely by himself. - -6. Liability -To the extent permitted under Law, The Software is provided under an AS-IS basis. -Licensor shall never, and without any limit, be liable for any damage, cost, -expense or any other payment incurred by Licensee as a result of Software’s -actions, failure, bugs and/or any other interaction between The Software and -Licensee’s end-equipment, computers, other software or any 3rd party, -end-equipment, computer or services. Moreover, Licensor shall never be liable -for any defect in source code written by Licensee when relying on The Software -or using The Software’s source code. - -7. Warranty - -7.1. Intellectual Property -Licensor hereby warrants that The Software does not violate or infringe any 3rd -party claims in regards to intellectual property, patents and/or trademarks and -that to the best of its knowledge no legal action has been taken against it for -any infringement or violation of any 3rd party intellectual property rights. - -7.2. No-Warranty -The Software is provided without any warranty; Licensor hereby disclaims any -warranty that The Software shall be error free, without defects or code which -may cause damage to Licensee’s computers or to Licensee, and that Software -shall be functional. Licensee shall be solely liable to any damage, defect or -loss incurred as a result of operating software and undertake the risks -contained in running The Software on License’s Server[s] and Website[s]. - -7.3. Prior Inspection -Licensee hereby states that he inspected The Software thoroughly and found -it satisfactory and adequate to his needs, that it does not interfere with his -regular operation and that it does meet the standards and scope of his computer -systems and architecture. Licensee found that The Software interacts with his -development, website and server environment and that it does not infringe any of -End User License Agreement of any software Licensee may use in performing his -services. Licensee hereby waives any claims regarding The Software's -incompatibility, performance, results and features, and warrants that he -inspected the The Software. - -8. No Refunds -Licensee warrants that he inspected The Software according to clause 7(c) and -that it is adequate to his needs. Accordingly, as The Software is intangible -goods, Licensee shall not be, ever, entitled to any refund, rebate, compensation -or restitution for any reason whatsoever, even if The Software contains -material flaws. - -9. Indemnification -Licensee hereby warrants to hold Licensor harmless and indemnify Licensor for -any lawsuit brought against it in regards to Licensee’s use of The Software in -means that violate, breach or otherwise circumvent this license, Licensor's -intellectual property rights or Licensor's title in The Software. Licensor shall -promptly notify Licensee in case of such legal action and request Licensee’s -consent prior to any settlement in relation to such lawsuit or claim. - -10. Governing Law, Jurisdiction -Licensee hereby agrees not to initiate class-action lawsuits against Licensor -in relation to this license and to compensate Licensor for any legal fees, cost -or attorney fees should any claim brought by Licensee against Licensor be -denied, in part or in full. - -11. Other software used - -This software is a derivative work of xhprof, delivered under the Apache -license version 2.0. You will find below a copy of this license. - - -Apache License - - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS diff --git a/packager/debian8/php70-quanta-mon/debian/rules b/packager/debian8/php70-quanta-mon/debian/rules deleted file mode 100755 index 29a3f0e..0000000 --- a/packager/debian8/php70-quanta-mon/debian/rules +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/make -f - -build: - phpize - dh_build - -override_dh_auto_install: - $(MAKE) INSTALL_ROOT=$$(pwd)/debian/php70-quanta-mon install - install -D -m 0644 quanta_mon.ini debian/php70-quanta-mon/etc/php/7.0/mods-available/quanta_mon.ini - -override_dh_shlibdeps: - dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info - -%: - dh $@ diff --git a/packager/debian8/php70-quanta-mon/debian/source/format b/packager/debian8/php70-quanta-mon/debian/source/format deleted file mode 100644 index 89ae9db..0000000 --- a/packager/debian8/php70-quanta-mon/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (native) diff --git a/packager/debian8/php71-quanta-mon/debian/changelog b/packager/debian8/php71-quanta-mon/debian/changelog deleted file mode 100644 index c1b6bba..0000000 --- a/packager/debian8/php71-quanta-mon/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -php71-quanta-mon (1.2.2) quanta; urgency=medium - - * Initial release. - - -- Matthieu ROSINSKI Thu, 10 Mar 2016 14:56:19 +0100 diff --git a/packager/debian8/php71-quanta-mon/debian/compat b/packager/debian8/php71-quanta-mon/debian/compat deleted file mode 100644 index ec63514..0000000 --- a/packager/debian8/php71-quanta-mon/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/packager/debian8/php71-quanta-mon/debian/control b/packager/debian8/php71-quanta-mon/debian/control deleted file mode 100644 index a24a0ad..0000000 --- a/packager/debian8/php71-quanta-mon/debian/control +++ /dev/null @@ -1,16 +0,0 @@ -Maintainer: Matthieu ROSINSKI -Section: php -Priority: optional -Build-Depends: debhelper (>= 9), dh-exec, dh-autoreconf, autotools-dev, libmonikor-dev, php7.1-dev -Standards-Version: 3.9.6 -Source: php71-quanta-mon - -Package: php71-quanta-mon -Provides: php-quanta-mon -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libmonikor (>= 1.0.0), php7.1-common (>= 7.1.0), phpapi-20160303, ucf -Recommends: monikor -Pre-Depends: ${misc:Pre-Depends} -Description: This PHP extension provides a profiler for Magento - The extension will trigger on custom http headers and send metrics to - Quanta over the quanta-agent. diff --git a/packager/debian8/php71-quanta-mon/debian/copyright b/packager/debian8/php71-quanta-mon/debian/copyright deleted file mode 100644 index c664af7..0000000 --- a/packager/debian8/php71-quanta-mon/debian/copyright +++ /dev/null @@ -1,348 +0,0 @@ -Copyright Quanta-Computing 2016 - -1. Preamble -This Agreement, signed on Mar 14, 2016 (hereinafter: Effective Date) governs -the relationship between the client, a Business Entity, (hereinafter: Licensee) -and Quanta-Computing, a duly registered company in whose principal place of -business is 41 rue Saint-Augustin, Paris, France (hereinafter: Licensor). This -Agreement sets the terms, rights, restrictions and obligations on using -php-quanta-mon (hereinafter: The Software) created and owned by Licensor, as -detailed herein. - -2. License Grant -Licensor hereby grants Licensee a Sublicensable, Non-assignable & -non-transferable, Pepetual, Non-commercial, Including the rights to distribute -derivative works, Non-exclusive license, all with accordance with the terms set -forth and other legal restrictions set forth in 3rd party software used while -running Software. - -2.1. Limited: Licensee may use Software for the purpose of: -2.1.1. Running Software on Licensee’s Website[s] and Server[s]; -2.1.2. Allowing 3rd Parties to run Software on Licensee’s Website[s] and Server[s]; -2.1.3. Publishing Software’s output to Licensee and 3rd Parties; -2.1.4. Distribute verbatim copies of Software’s output (including compiled binaries); -2.1.5. Modify Software to suit Licensee’s needs and specifications. - -2.2. This license is granted perpetually, as long as you do not materially breach it. - -2.3. Non Assignable & Non-Transferable -Licensee may not assign or transfer his rights and duties under this license. - -2.4. Non-Commercial -Licensee may not use Software for commercial purposes. for the purpose of this -license, commercial purposes means that a 3rd party has to pay in order to -access Software or that the Website that runs Software is behind a paywall. - -2.5. Including the right to Distribute Derivative Works -Licensee may create and distribute derivative works based on Software, including -amending Software’s source code, modifying it, integrating it into a larger -work or removing portions of Software, as long as credit to the Licensor is -granted and that redistribution is made under the terms of this license. - -2.6. [Multi-]Site -Licensee may use Software on unlimited server[s] and unlimited website[s], for -Licensee’s websites only. - -3. Term & Termination -The Term of this license shall be until terminated. Licensor may terminate this -Agreement, including Licensee’s license in the case where Licensee : - -3.1. became insolvent or otherwise entered into any liquidation process; or -3.2. exported The Software to any jurisdiction where licensor may not enforce -his rights under this agreements in; or -3.3. Licensee was in breach of any of this license's terms and conditions and -such breach was not cured, immediately upon notification; or -3.4 Licensee in breach of any of the terms of clause 2 to this license; or -3.5. Licensee otherwise entered into any arrangement which caused Licensor to -be unable to enforce his rights under this License. - -4. Upgrades, Updates and Fixes -Licensor may provide Licensee, from time to time, with Upgrades, Updates or -Fixes, as detailed herein and according to his sole discretion. Licensor shall -provide any update or Fix free of charge; however, nothing in this Agreement -shall require Licensor to provide Updates or Fixes. - -4.1. Upgrades -For the purpose of this license, an Upgrade shall be a material amendment in -The Software, which contains new features and or major performance improvements -and shall be marked as a new version number. For example, should Licensee purchase -The Software under version 1.X.X, an upgrade shall commence under number 2.0.0. - -4.2. Updates -For the purpose of this license, an update shall be a minor amendment in The -Software, which may contain new features or minor improvements and shall be -marked as a new sub-version number. For example, should Licensee purchase The -Software under version 1.1.X, an upgrade shall commence under number 1.2.0. - -4.3. Fix -For the purpose of this license, a fix shall be a minor amendment in The -Software, intended to remove bugs or alter minor features which impair the -The Software's functionality. A fix shall be marked as a new sub-sub-version -number. For example, should Licensee purchase Software under version 1.1.1, an -upgrade shall commence under number 1.1.2. - -5. Support -Software is provided under an AS-IS basis and without any support, updates or -maintenance. Nothing in this Agreement shall require Licensor to provide Licensee -with support or fixes to any bug, failure, mis-performance or other defect in -The Software. - -5.1. Bug Notification -Licensee may provide Licensor of details regarding any bug, defect or failure -in The Software promptly and with no delay from such event; Licensee shall -comply with Licensor's request for information regarding bugs, defects or -failures and furnish him with information, screenshots and try to reproduce -such bugs, defects or failures. - -5.2. Feature Request -Licensee may request additional features in Software, provided, however, that -(i) Licensee shall waive any claim or right in such feature should feature be -developed by Licensor; (ii) Licensee shall be prohibited from developing the -feature, or disclose such feature request, or feature, to any 3rd party directly -competing with Licensor or any 3rd party which may be, following the development -of such feature, in direct competition with Licensor; (iii) Licensee warrants -that feature does not infringe any 3rd party patent, trademark, trade-secret or -any other intellectual property right; and (iv) Licensee developed, envisioned -or created the feature solely by himself. - -6. Liability -To the extent permitted under Law, The Software is provided under an AS-IS basis. -Licensor shall never, and without any limit, be liable for any damage, cost, -expense or any other payment incurred by Licensee as a result of Software’s -actions, failure, bugs and/or any other interaction between The Software and -Licensee’s end-equipment, computers, other software or any 3rd party, -end-equipment, computer or services. Moreover, Licensor shall never be liable -for any defect in source code written by Licensee when relying on The Software -or using The Software’s source code. - -7. Warranty - -7.1. Intellectual Property -Licensor hereby warrants that The Software does not violate or infringe any 3rd -party claims in regards to intellectual property, patents and/or trademarks and -that to the best of its knowledge no legal action has been taken against it for -any infringement or violation of any 3rd party intellectual property rights. - -7.2. No-Warranty -The Software is provided without any warranty; Licensor hereby disclaims any -warranty that The Software shall be error free, without defects or code which -may cause damage to Licensee’s computers or to Licensee, and that Software -shall be functional. Licensee shall be solely liable to any damage, defect or -loss incurred as a result of operating software and undertake the risks -contained in running The Software on License’s Server[s] and Website[s]. - -7.3. Prior Inspection -Licensee hereby states that he inspected The Software thoroughly and found -it satisfactory and adequate to his needs, that it does not interfere with his -regular operation and that it does meet the standards and scope of his computer -systems and architecture. Licensee found that The Software interacts with his -development, website and server environment and that it does not infringe any of -End User License Agreement of any software Licensee may use in performing his -services. Licensee hereby waives any claims regarding The Software's -incompatibility, performance, results and features, and warrants that he -inspected the The Software. - -8. No Refunds -Licensee warrants that he inspected The Software according to clause 7(c) and -that it is adequate to his needs. Accordingly, as The Software is intangible -goods, Licensee shall not be, ever, entitled to any refund, rebate, compensation -or restitution for any reason whatsoever, even if The Software contains -material flaws. - -9. Indemnification -Licensee hereby warrants to hold Licensor harmless and indemnify Licensor for -any lawsuit brought against it in regards to Licensee’s use of The Software in -means that violate, breach or otherwise circumvent this license, Licensor's -intellectual property rights or Licensor's title in The Software. Licensor shall -promptly notify Licensee in case of such legal action and request Licensee’s -consent prior to any settlement in relation to such lawsuit or claim. - -10. Governing Law, Jurisdiction -Licensee hereby agrees not to initiate class-action lawsuits against Licensor -in relation to this license and to compensate Licensor for any legal fees, cost -or attorney fees should any claim brought by Licensee against Licensor be -denied, in part or in full. - -11. Other software used - -This software is a derivative work of xhprof, delivered under the Apache -license version 2.0. You will find below a copy of this license. - - -Apache License - - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS diff --git a/packager/debian8/php71-quanta-mon/debian/rules b/packager/debian8/php71-quanta-mon/debian/rules deleted file mode 100644 index 6d982cf..0000000 --- a/packager/debian8/php71-quanta-mon/debian/rules +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/make -f - -build: - phpize - dh_build - -override_dh_auto_install: - $(MAKE) INSTALL_ROOT=$$(pwd)/debian/php71-quanta-mon install - install -D -m 0644 quanta_mon.ini debian/php71-quanta-mon/etc/php/7.1/mods-available/quanta_mon.ini - -override_dh_shlibdeps: - dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info - -%: - dh $@ diff --git a/packager/debian8/php71-quanta-mon/debian/source/format b/packager/debian8/php71-quanta-mon/debian/source/format deleted file mode 100644 index 89ae9db..0000000 --- a/packager/debian8/php71-quanta-mon/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (native) diff --git a/packager/shell.sh b/packager/shell.sh deleted file mode 100755 index b2be31c..0000000 --- a/packager/shell.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -ostype=$1 -version=$2 -shift 2 -localdir=`git rev-parse --show-toplevel` -dockerfile=${localdir}/packager/${ostype}-${version}.dockerfile - -if [ -z "$ostype" ] || [ -z "$version" ]; then - echo "Usage: ./shell.sh [docker run args...]" - exit 1 -fi - -if [ ! -f $dockerfile ]; then - echo "ERROR: Wrong os or version, ${dockerfile} does not exists" - exit 1 -fi - -echo "======>>> Building Docker image..." -image=`cat ${dockerfile} | docker build -q - | cut -d ':' -f 2` -ret=$? -if [ ! $ret -eq 0 ] || [ -z "$image" ] ; then - echo "ERROR: Failed to build docker image, exiting..." - exit 1 -fi - -echo "======>>> Running shell" -exec docker run -ti -p 8080:80 -v ${localdir}:/php-module $@ ${image} diff --git a/qa/config.yml b/qa/config.yml deleted file mode 100644 index da5ab88..0000000 --- a/qa/config.yml +++ /dev/null @@ -1,45 +0,0 @@ -global: - templates_dir: ./templates - spec_root: ./specs - docker_build_dir: ./build - docker_host: 192.168.59.103 - logs_dir: ./logs - -environment: - vary: - - packager - - php - - magento - templates: - Dockerfile: Dockerfile.tpl - local.xml: local.xml.tpl - ports: - - '8080' - - '80' - -defaults: - magento: &magento_defaults - user: magento - password: magento - packager: &packager_defaults - pkg_zsh: zsh - -context_data: - packager: - dpkg: - <<: *packager_defaults - base_image: ubuntu - pkg_install_cmd: apt-get install -y - rpm: - <<: *packager_defaults - base_image: centos - pkg_install_cmd: yum install -y - pkg_nc: nc - php: - php-5.3: - php_version: 5.3.3 - php-5.4: - php_version: 5.4.0 - magento: - CE-1.9: - magento_mount: /data/magento/1.9.0.1 diff --git a/qa/dockerunner/__init__.py b/qa/dockerunner/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/qa/dockerunner/__main__.py b/qa/dockerunner/__main__.py deleted file mode 100644 index a49a131..0000000 --- a/qa/dockerunner/__main__.py +++ /dev/null @@ -1,59 +0,0 @@ -import argparse - -from dockerunner.builder import Builder -from dockerunner.runner import Runner -from dockerunner.config import load_config -from dockerunner.spec import Suite - - -VALID_ACTIONS = ['build', 'run'] - -def _title(title, char='#', width=80): - """ - Returns a pretty title - - """ - out = '#' * width + "\n" - out += '##' + ' ' * (width // 2 - 2 - (len(title) // 2 + len(title) % 2)) - out += title.upper() - out += ' ' * (width // 2 + width % 2 - 2 - len(title) // 2) + '##' - out += "\n" + '#' * width + "\n" - return out - - -def main(): - parser = argparse.ArgumentParser( - description='This program is an awesome test runner around Docker containers', - epilog='Copyright Quanta-computing 2014', - ) - parser.add_argument('-d', '--debug', action='store_true', help='debug mode') - parser.add_argument('--no-build-docker', action='store_true', help='disable build of docker images') - parser.add_argument('--no-build-sql', action='store_true', help='disable sqldump imports') - parser.add_argument('--test', action='append', help='test suites to run (default all)') - parser.add_argument('actions', nargs='*', choices=VALID_ACTIONS + [[]], - help='what to do (default all)', - ) - opts = parser.parse_args() - if not opts.actions: - opts.actions = VALID_ACTIONS - if opts.test is not None and len(opts.test) == 0: - opts.test = None - config = load_config() - builder = Builder(config, debug=opts.debug, - without_docker=opts.no_build_docker, without_sqldump=opts.no_build_sql) - runner = Runner(config) - test_suites = Suite(config['global']['spec_root'], opts.test) - builder.prepare() - if 'build' in opts.actions: - print(_title("build phase")) - builder.build() - print("\n") - if 'run' in opts.actions: - print(_title("run phase")) - for build in builder.builds: - runner.run(build, test_suites) - print("\n{}\n".format('-' * 80)) - - -if __name__ == "__main__": - main() diff --git a/qa/dockerunner/builder/__init__.py b/qa/dockerunner/builder/__init__.py deleted file mode 100644 index 3c541a0..0000000 --- a/qa/dockerunner/builder/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from .builder import Builder -from .build import Build diff --git a/qa/dockerunner/builder/build.py b/qa/dockerunner/builder/build.py deleted file mode 100644 index d0aa2b0..0000000 --- a/qa/dockerunner/builder/build.py +++ /dev/null @@ -1,82 +0,0 @@ -import os -import json -import uuid - -class Build: - """ - This class represents a unique build - - """ - DOCKER_IMG_NAME = 'quanta/dockerunner' - - def __init__(self, builder, name, build_dir, context, debug=False): - self.debug = debug - self.builder = builder - self.name = name - self.build_dir = build_dir - self.context = context - self.uid = str(uuid.uuid1()) - self.context['docker_tag'] = self.docker_tag - - - @property - def docker_tag(self): - """ - Returns the docker tag name - - """ - return '{}:{}_{}'.format(self.DOCKER_IMG_NAME, self.name, self.uid) - - - def build(self): - """ - Performs the build for this object, this step includes: - - creation of the build directory - - creation of a dockerfile - - build of the docker image - - import of the SQL database - - Each task is related to the build configuration defined in the builder - - """ - if self.debug: - print("Building {}".format(self.name)) - if not os.path.isdir(self.build_dir): - os.makedirs(self.build_dir) - self.render_templates() - if not self.builder.without_docker: - self.build_docker() - if not self.builder.without_sqldump: - self.import_sqldump() - print("Built {}".format(self.name)) - - - def render_templates(self): - """ - This method iterates through the template list and render all templates into the build dir - - """ - for file_path, template in self.context.get('templates', {}).items(): - if self.debug: - print('Rendering template {}'.format(template)) - with open(os.path.join(self.build_dir, file_path), 'w') as file: - file.write(self.builder.get_template(template).render(**self.context)) - - - def build_docker(self): - """ - This method is in charge of creating the Dockerfile from the template and building the docker image - - """ - for out in self.builder.docker.build(path=self.build_dir, rm=True, forcerm=True, tag=self.docker_tag): - if self.debug: - print("Building {} >> {}".format(self.docker_tag, out)) - - - def import_sqldump(self): - """ - This method imports the sqldump into the database - Both the sqldump to use and the database are fetched from the config - - """ - print("Acting like I'm importing dumps for {}".format(self.name)) diff --git a/qa/dockerunner/builder/builder.py b/qa/dockerunner/builder/builder.py deleted file mode 100644 index b477a90..0000000 --- a/qa/dockerunner/builder/builder.py +++ /dev/null @@ -1,83 +0,0 @@ -import os -import jinja2 - -from .build import Build - - -class Builder: - """ - This class is in charge of pulling/building docker instances - - """ - def __init__(self, cfg, without_docker=False, without_sqldump=False, debug=True): - from docker.client import Client - from docker.utils import kwargs_from_env - - self.debug = debug - self.config = cfg - self.builds = [] - self.without_docker = without_docker - self.without_sqldump = without_sqldump - docker_kwargs = kwargs_from_env() - docker_kwargs['tls'].assert_hostname = False - self.docker = Client(**docker_kwargs) - self.jinja = jinja2.Environment(loader=jinja2.FileSystemLoader(searchpath=self.config['global']['templates_dir'])) - - - def _build_dir(self): - """ - Returns the build directory from configuration - - """ - return self.config['global'].get('docker_build_dir', '/tmp/build') - - - def _create_context(self, build_name, vary, build_env): - """ - Creates the context for a given build from the configuration - - """ - ctx = dict(self.config['environment']) - for k, v in zip(vary, build_env): - ctx.update(self.config['context_data'][k][v]) - ctx['build_name'] = build_name - return ctx - - - def get_template(self, name): - """ - Fetch the dockerfile template path from the config and returns a jinja Template instance - - """ - return self.jinja.get_template(name) - - - def prepare(self): - """ - This method prepare the build by creating Build objects - - """ - import itertools - - vary_values = [] - vary_keys = self.config['environment'].get('vary', []) - for key in vary_keys: - vary_values.append(list(self.config['context_data'][key].keys())) - for build_env in itertools.product(*vary_values): - build_name = '_'.join(build_env) - self.builds.append( - Build(self, build_name, - os.path.join(self._build_dir(), build_name), - self._create_context(build_name, vary_keys, build_env), - debug=self.debug - ) - ) - - - def build(self): - """ - This method builds all the needed environments - - """ - for build in self.builds: - build.build() diff --git a/qa/dockerunner/config/__init__.py b/qa/dockerunner/config/__init__.py deleted file mode 100644 index c49bb97..0000000 --- a/qa/dockerunner/config/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .config import load_config diff --git a/qa/dockerunner/config/config.py b/qa/dockerunner/config/config.py deleted file mode 100644 index 2900c39..0000000 --- a/qa/dockerunner/config/config.py +++ /dev/null @@ -1,9 +0,0 @@ -def load_config(path='config.yml'): - """ - Loads the configuration file - - """ - import yaml - - with open(path) as config_file: - return yaml.safe_load(config_file) diff --git a/qa/dockerunner/runner/__init__.py b/qa/dockerunner/runner/__init__.py deleted file mode 100644 index 7c10232..0000000 --- a/qa/dockerunner/runner/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .runner import Runner diff --git a/qa/dockerunner/runner/runner.py b/qa/dockerunner/runner/runner.py deleted file mode 100644 index 47862aa..0000000 --- a/qa/dockerunner/runner/runner.py +++ /dev/null @@ -1,47 +0,0 @@ -import os - - -class Runner: - """ - This class is in charge of loading test suites and runs them on different environments - - """ - STOP_TIMEOUT = 3 - - def __init__(self, cfg): - from docker.client import Client - from docker.utils import kwargs_from_env - - self.config = cfg - docker_kwargs = kwargs_from_env() - docker_kwargs['tls'].assert_hostname = False - self.docker = Client(**docker_kwargs) - - - def run(self, build, *tests): - """ - Run all the test suites passed in as parameters on the given build - This method will start a container of the build, run the tests and stop it - - """ - from docker.utils import create_host_config - - print("Running tests on {}".format(build.name)) - ports = self.config['environment']['ports'] - host = self.config['global'].get('docker_host', os.getenv('DOCKER_HOST').split('/')[-1].split(':')[0]) - container = self.docker.create_container( - image=build.docker_tag, - command='/bin/bash -c "nc -l 8080"', - ports=ports, - host_config=create_host_config(port_bindings=dict(zip(ports, [None] * len(ports)))) - ).get('Id') - self.docker.start(container) - info = self.docker.inspect_container(container) - port_bindings = {port: bind[0]['HostPort'] for port, bind in info['NetworkSettings']['Ports'].items()} - for test in tests: - test.run(host, port_bindings, build.context) - self.docker.stop(container, timeout=self.STOP_TIMEOUT) - log_file_path = os.path.join(self.config['global'].get('logs_dir', '/tmp'), '{}.log'.format(build.name)) - with open(log_file_path, 'wb') as logs: - logs.write(self.docker.logs(container, stdout=True, stderr=True, stream=False)) - print("Container logs wrote to {}".format(log_file_path)) diff --git a/qa/dockerunner/spec/__init__.py b/qa/dockerunner/spec/__init__.py deleted file mode 100644 index b816b5e..0000000 --- a/qa/dockerunner/spec/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from .spec import Spec -from .suite import Suite diff --git a/qa/dockerunner/spec/spec.py b/qa/dockerunner/spec/spec.py deleted file mode 100644 index 42eeb3e..0000000 --- a/qa/dockerunner/spec/spec.py +++ /dev/null @@ -1,38 +0,0 @@ -import subprocess -import json - -class Spec: - """ - This class represents a spec script - - """ - DEFAULT_TIMEOUT = 5 - - def __init__(self, script, expected_code=0, timeout=None): - self.script = script - self.expected_code = expected_code - if timeout: - self.timeout = timeout - else: - self.timeout = self.DEFAULT_TIMEOUT - - def run(self, host, ports, context): - """ - Runs the spec script - - """ - proc = subprocess.Popen([self.script, host, json.dumps(ports), json.dumps(context)], - stdout=subprocess.PIPE, stderr=subprocess.PIPE) - try: - (out, err) = proc.communicate(timeout=self.timeout) - if proc.returncode != self.expected_code: - print("ERROR: Test {} failed (code {})".format(self.script, proc.returncode)) - print("STDOUT: {}\nSTDERR: {}".format(out, err)) - return False - else: - print("OK: Test {} succeded".format(self.script)) - return True - except subprocess.TimeoutExpired: - print("ERROR: Test {} failed (timeout)".format(self.script)) - proc.kill() - return False diff --git a/qa/dockerunner/spec/suite.py b/qa/dockerunner/spec/suite.py deleted file mode 100644 index bb57ef6..0000000 --- a/qa/dockerunner/spec/suite.py +++ /dev/null @@ -1,56 +0,0 @@ -import os - -from .spec import Spec - - -class Suite: - """ - This class represents a test suite - - """ - def __init__(self, path, suites=None): - self.path = path - self._load_tests(suites) - - - @property - def script(self): - """ - This just returns self.path for correct duck-typing with Spec - - """ - return self.path - - - def _load_tests(self, suites=None): - """ - Read the tests or suites which are present in self.path and load them - - """ - self.tests = [] - if not os.path.isdir(self.path): - return - (_, dirs, files) = next(os.walk(self.path)) - for d in dirs: - if suites is None or os.path.basename(d) in suites: - self.tests.append(Suite(os.path.join(self.path, d))) - for f in files: - spec = os.path.join(self.path, f) - if os.access(spec, os.X_OK): - self.tests.append(Spec(spec)) - else: - print("Warning: {} is not a valid spec file (not executable)".format(spec)) - - - - def run(self, host, ports, context): - """ - Run the contained tests or suite - - """ - print("Running test suite {}".format(self.path)) - code = True - for t in self.tests: - if not t.run(host, ports, context): - code = False - return code diff --git a/qa/requirements.txt b/qa/requirements.txt deleted file mode 100644 index 27441de..0000000 --- a/qa/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -docker-py -jinja2 -pyaml -pyOpenSSL -ndg-httpsclient -pyasn1 diff --git a/qa/specs/test/test.sh b/qa/specs/test/test.sh deleted file mode 100755 index c07010c..0000000 --- a/qa/specs/test/test.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -echo "this test is failing" -echo "much errors" 1>&2 -exit 1 diff --git a/qa/specs/toto/test2.py b/qa/specs/toto/test2.py deleted file mode 100755 index 3f5fe48..0000000 --- a/qa/specs/toto/test2.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python -import sys -import json -import socket - -def main(): - (_, host, ports, context) = sys.argv - print("CONTEXT: {}".format(json.dumps(json.loads(context), indent=2))) - print("HOST: {}".format(host)) - print("PORTS: {}".format(json.dumps(json.loads(ports), indent=2))) - ports = json.loads(ports) - context = json.loads(context) - s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - s.connect((host, int(ports['8080/tcp']))) - s.sendall('SAlut les connards'.encode('utf-8')) - s.close() - -if __name__ == "__main__": - main() diff --git a/qa/templates/Dockerfile.tpl b/qa/templates/Dockerfile.tpl deleted file mode 100644 index 3ba5ce8..0000000 --- a/qa/templates/Dockerfile.tpl +++ /dev/null @@ -1,15 +0,0 @@ -# -# Dockerfile template for building Quanta PHP module -# - -FROM {{base_image}} -MAINTAINER Matthieu 'Korrigan' ROSINSKI - -RUN {{pkg_install_cmd}} {{pkg_nc}} {{pkg_zsh}} - -CMD ["/bin/zsh"] - -EXPOSE 80 -EXPOSE 8080 - -COPY local.xml / diff --git a/qa/templates/local.xml.tpl b/qa/templates/local.xml.tpl deleted file mode 100644 index 2608452..0000000 --- a/qa/templates/local.xml.tpl +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - false - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - From be2f1afb247ec113f9032dca9ce1df3eb824e23c Mon Sep 17 00:00:00 2001 From: Matthieu Rosinski Date: Fri, 25 Aug 2023 10:55:14 +0200 Subject: [PATCH 53/60] bump version --- extension/include/quanta_mon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/include/quanta_mon.h b/extension/include/quanta_mon.h index 0cf71e6..3060e85 100644 --- a/extension/include/quanta_mon.h +++ b/extension/include/quanta_mon.h @@ -44,7 +44,7 @@ /* Size of a temp scratch buffer */ #define SCRATCH_BUF_LEN 512 -#define QUANTA_MON_VERSION "1.3.3" +#define QUANTA_MON_VERSION "1.3.4" /* Xhprof's global state. From 983a842a9e18913d0633101a7754fd3fe309400b Mon Sep 17 00:00:00 2001 From: Matthieu Rosinski Date: Fri, 25 Aug 2023 11:02:02 +0200 Subject: [PATCH 54/60] cleanup --- magento2.txt | 263 --------------------------------------------------- 1 file changed, 263 deletions(-) delete mode 100644 magento2.txt diff --git a/magento2.txt b/magento2.txt deleted file mode 100644 index 078d309..0000000 --- a/magento2.txt +++ /dev/null @@ -1,263 +0,0 @@ -- Magento\Framework\App\Bootstrap::create - - Create boostrap - - Bootstrap creates application - - Bootstrap::run - - launches application -> response - - send response -- Magento\Framework\App\FrontController::dispatch -- Magento\Framework\App\Action\Action::dispatch -- Magento\Framework\View\Page\Builder::loadLayoutUpdates: C'est ou ? Pas la. -- Magento\Framework\View\Page\Builder::generateLayoutXml: C'est ou ? Pas la. -- Magento\Framework\View\Page\Builder::generateLayoutBlocks -- Magento\Framework\View\Element\AbstractBlock::toHtml - -fwrite(fopen('/php-module/debug-magento.log', 'w+'), "END hasPlugins for " . $type . " @" . microtime(true) . "\n"); - -BLOCK googleoptimizer.experiment.script rendered in 5.789958 - - class: Magento\GoogleOptimizer\Block\Code\Page (/php-module/magento/magento2/app/code/Magento/GoogleOptimizer/Block/Code/Page.php) - - template: (null) - - SQL: 0 (0.000000ms) -BLOCK head.components rendered in 36.917381 - - class: Magento\Framework\View\Element\Js\Components (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Js/Components.php) - - template: Magento_Catalog::js/components.phtml - - SQL: 0 (0.000000ms) -BLOCK bundle_checkout_page_head_components rendered in 33.733425 - - class: Magento\Framework\View\Element\Js\Components (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Js/Components.php) - - template: Magento_Bundle::js/components.phtml - - SQL: 0 (0.000000ms) -BLOCK sales_page_head_components rendered in 33.660797 - - class: Magento\Framework\View\Element\Js\Components (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Js/Components.php) - - template: Magento_Sales::js/components.phtml - - SQL: 0 (0.000000ms) -BLOCK checkout_page_head_components rendered in 30.282082 - - class: Magento\Framework\View\Element\Js\Components (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Js/Components.php) - - template: Magento_Checkout::js/components.phtml - - SQL: 0 (0.000000ms) -BLOCK newsletter_head_components rendered in 28.513397 - - class: Magento\Framework\View\Element\Js\Components (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Js/Components.php) - - template: Magento_Newsletter::js/components.phtml - - SQL: 0 (0.000000ms) -BLOCK pagecache_page_head_components rendered in 29.563440 - - class: Magento\Framework\View\Element\Js\Components (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Js/Components.php) - - template: Magento_PageCache::js/components.phtml - - SQL: 0 (0.000000ms) -BLOCK reports_page_head_components rendered in 24.767635 - - class: Magento\Framework\View\Element\Js\Components (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Js/Components.php) - - template: Magento_Reports::js/components.phtml - - SQL: 0 (0.000000ms) -BLOCK wishlist_page_head_components rendered in 28.467155 - - class: Magento\Framework\View\Element\Js\Components (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Js/Components.php) - - template: Magento_Wishlist::js/components.phtml - - SQL: 0 (0.000000ms) -BLOCK requirejs-config rendered in 10.732418 - - class: Magento\RequireJs\Block\Html\Head\Config (/php-module/magento/magento2/app/code/Magento/RequireJs/Block/Html/Head/Config.php) - - template: (null) - - SQL: 0 (0.000000ms) -BLOCK translate-config rendered in 6.499282 - - class: Magento\Translation\Block\Html\Head\Config (/php-module/magento/magento2/app/code/Magento/Translation/Block/Html/Head/Config.php) - - template: (null) - - SQL: 0 (0.000000ms) -BLOCK translate rendered in 44.601196 - - class: Magento\Translation\Block\Js (/php-module/magento/magento2/app/code/Magento/Translation/Block/Js.php) - - template: Magento_Translation::translate.phtml - - SQL: 0 (0.000000ms) -BLOCK js_cookies rendered in 19.479052 - - class: Magento\Framework\View\Element\Js\Cookie (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Js/Cookie.php) - - template: Magento_Theme::js/cookie.phtml - - SQL: 0 (0.000000ms) -BLOCK global_notices rendered in 24.743113 - - class: Magento\Theme\Block\Html\Notices (/php-module/magento/magento2/app/code/Magento/Theme/Block/Html/Notices.php) - - template: html/notices.phtml - - SQL: 0 (0.000000ms) -BLOCK cookie_notices rendered in 36.213001 - - class: Magento\Cookie\Block\Html\Notices (/php-module/magento/magento2/app/code/Magento/Cookie/Block/Html/Notices.php) - - template: html/notices.phtml - - SQL: 0 (0.000000ms) -BLOCK google_analytics rendered in 14.291226 - - class: Magento\GoogleAnalytics\Block\Ga (/php-module/magento/magento2/app/code/Magento/GoogleAnalytics/Block/Ga.php) - - template: ga.phtml - - SQL: 0 (0.000000ms) -BLOCK logger rendered in 21.607634 - - class: Magento\Ui\Block\Logger (/php-module/magento/magento2/app/code/Magento/Ui/Block/Logger.php) - - template: Magento_Ui::logger.phtml - - SQL: 0 (0.000000ms) -BLOCK paypal.express-in-context.component rendered in 10.012280 - - class: Magento\Paypal\Block\Express\InContext\Component (/php-module/magento/magento2/app/code/Magento/Paypal/Block/Express/InContext/Component.php) - - template: Magento_Paypal::express/in-context/component.phtml - - SQL: 0 (0.000000ms) -BLOCK skip_to_content rendered in 28.063461 - - class: Magento\Framework\View\Element\Template (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Template.php) - - template: Magento_Theme::html/skip.phtml - - SQL: 0 (0.000000ms) -BLOCK currency rendered in 82.285896 - - class: Magento\Directory\Block\Currency (/php-module/magento/magento2/app/code/Magento/Directory/Block/Currency.php) - - template: currency.phtml - - SQL: 1 (0.525570ms) -BLOCK store_language rendered in 28.722357 - - class: Magento\Store\Block\Switcher\Interceptor (/php-module/magento/magento2/var/generation/Magento/Store/Block/Switcher/Interceptor.php) - - template: switch/languages.phtml - - SQL: 0 (0.000000ms) -BLOCK header.links rendered in 18.268587 - - class: Magento\Framework\View\Element\Html\Links (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Html/Links.php) - - template: (null) - - SQL: 0 (0.000000ms) -BLOCK header rendered in 24.641272 - - class: Magento\Theme\Block\Html\Header (/php-module/magento/magento2/app/code/Magento/Theme/Block/Html/Header.php) - - template: html/header.phtml - - SQL: 0 (0.000000ms) -BLOCK customer rendered in 27.577677 - - class: Magento\Customer\Block\Account\Customer (/php-module/magento/magento2/app/code/Magento/Customer/Block/Account/Customer.php) - - template: account/customer.phtml - - SQL: 0 (0.000000ms) -BLOCK authorization-link-login rendered in 30.238008 - - class: Magento\Customer\Block\Account\AuthorizationLink (/php-module/magento/magento2/app/code/Magento/Customer/Block/Account/AuthorizationLink.php) - - template: account/link/authorization.phtml - - SQL: 0 (0.000000ms) -BLOCK register-link rendered in 7.432120 - - class: Magento\Customer\Block\Account\RegisterLink (/php-module/magento/magento2/app/code/Magento/Customer/Block/Account/RegisterLink.php) - - template: (null) - - SQL: 0 (0.000000ms) -BLOCK logo rendered in 55.656406 - - class: Magento\Theme\Block\Html\Header\Logo (/php-module/magento/magento2/app/code/Magento/Theme/Block/Html/Header/Logo.php) - - template: html/header/logo.phtml - - SQL: 0 (0.000000ms) -BLOCK minicart rendered in 570.008606 - - class: Magento\Checkout\Block\Cart\Sidebar\Interceptor (/php-module/magento/magento2/var/generation/Magento/Checkout/Block/Cart/Sidebar/Interceptor.php) - - template: cart/minicart.phtml - - SQL: 0 (0.000000ms) -BLOCK top.search rendered in 84.320778 - - class: Magento\Framework\View\Element\Template (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Template.php) - - template: Magento_Search::form.mini.phtml - - SQL: 0 (0.000000ms) -BLOCK advanced-search-link rendered in 36.632492 - - class: Magento\Framework\View\Element\Template (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Template.php) - - template: Magento_CatalogSearch::advanced/link.phtml - - SQL: 0 (0.000000ms) -BLOCK catalog.compare.link rendered in 28.013651 - - class: Magento\Framework\View\Element\Template (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Template.php) - - template: Magento_Catalog::product/compare/link.phtml - - SQL: 0 (0.000000ms) -BLOCK navigation.sections rendered in 35.174446 - - class: Magento\Framework\View\Element\Template (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Template.php) - - template: Magento_Theme::html/sections.phtml - - SQL: 0 (0.000000ms) -BLOCK store.menu rendered in 8.337815 - - class: Magento\Framework\View\Element\Template (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Template.php) - - template: Magento_Theme::html/container.phtml - - SQL: 0 (0.000000ms) -BLOCK catalog.topnav rendered in 732.052551 - - class: Magento\Theme\Block\Html\Topmenu\Interceptor (/php-module/magento/magento2/var/generation/Magento/Theme/Block/Html/Topmenu/Interceptor.php) - - template: html/topmenu.phtml - - SQL: 4 (3.121456ms) -BLOCK store.links rendered in 7.730938 - - class: Magento\Framework\View\Element\Text (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Text.php) - - template: (null) - - SQL: 0 (0.000000ms) -BLOCK store.settings rendered in 7.718015 - - class: Magento\Framework\View\Element\Template (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Template.php) - - template: Magento_Theme::html/container.phtml - - SQL: 0 (0.000000ms) -BLOCK store.settings.language rendered in 10.857349 - - class: Magento\Store\Block\Switcher\Interceptor (/php-module/magento/magento2/var/generation/Magento/Store/Block/Switcher/Interceptor.php) - - template: switch/languages.phtml - - SQL: 0 (0.000000ms) -BLOCK store.settings.currency rendered in 9.007850 - - class: Magento\Directory\Block\Currency (/php-module/magento/magento2/app/code/Magento/Directory/Block/Currency.php) - - template: currency.phtml - - SQL: 1 (0.448219ms) -BLOCK bml.center.logo rendered in 8.030522 - - class: Magento\Paypal\Block\Bml\Banners (/php-module/magento/magento2/app/code/Magento/Paypal/Block/Bml/Banners.php) - - template: bml.phtml - - SQL: 0 (0.000000ms) -BLOCK breadcrumbs rendered in 18.316980 - - class: Magento\Theme\Block\Html\Breadcrumbs (/php-module/magento/magento2/app/code/Magento/Theme/Block/Html/Breadcrumbs.php) - - template: html/breadcrumbs.phtml - - SQL: 0 (0.000000ms) -BLOCK skip_to_content.target rendered in 29.893190 - - class: Magento\Framework\View\Element\Template (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Template.php) - - template: Magento_Theme::html/skiptarget.phtml - - SQL: 0 (0.000000ms) -BLOCK page.main.title rendered in 33.394073 - - class: Magento\Theme\Block\Html\Title (/php-module/magento/magento2/app/code/Magento/Theme/Block/Html/Title.php) - - template: html/title.phtml - - SQL: 0 (0.000000ms) -BLOCK ajax.message.placeholder rendered in 31.979200 - - class: Magento\Framework\View\Element\Template (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Template.php) - - template: Magento_Theme::html/messages.phtml - - SQL: 0 (0.000000ms) -BLOCK messages rendered in 34.218288 - - class: Magento\Framework\View\Element\Messages (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Messages.php) - - template: Magento_Theme::messages.phtml - - SQL: 0 (0.000000ms) -BLOCK formkey rendered in 14.152176 - - class: Magento\Framework\View\Element\FormKey (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/FormKey.php) - - template: (null) - - SQL: 0 (0.000000ms) -BLOCK authentication-popup rendered in 33.563507 - - class: Magento\Customer\Block\Account\AuthenticationPopup (/php-module/magento/magento2/app/code/Magento/Customer/Block/Account/AuthenticationPopup.php) - - template: account/authentication-popup.phtml - - SQL: 0 (0.000000ms) -BLOCK customer.section.config rendered in 42.847301 - - class: Magento\Customer\Block\SectionConfig (/php-module/magento/magento2/app/code/Magento/Customer/Block/SectionConfig.php) - - template: Magento_Customer::js/section-config.phtml - - SQL: 0 (0.000000ms) -BLOCK customer.customer.data rendered in 32.647064 - - class: Magento\Customer\Block\CustomerData (/php-module/magento/magento2/app/code/Magento/Customer/Block/CustomerData.php) - - template: Magento_Customer::js/customer-data.phtml - - SQL: 0 (0.000000ms) -BLOCK pageCache rendered in 27.960127 - - class: Magento\PageCache\Block\Javascript (/php-module/magento/magento2/app/code/Magento/PageCache/Block/Javascript.php) - - template: Magento_PageCache::javascript.phtml - - SQL: 0 (0.000000ms) -BLOCK 5397eef51396ef149b74173cc5279e16 rendered in 3857.167236 - - class: Magento\Cms\Block\Widget\Block (/php-module/magento/magento2/app/code/Magento/Cms/Block/Widget/Block.php) - - template: widget/static_block/default.phtml - - SQL: 226 (190.975647ms) -BLOCK cms_page rendered in 6.752957 - - class: Magento\Cms\Block\Page (/php-module/magento/magento2/app/code/Magento/Cms/Block/Page.php) - - template: (null) - - SQL: 0 (0.000000ms) -BLOCK form.subscribe rendered in 18.168623 - - class: Magento\Newsletter\Block\Subscribe (/php-module/magento/magento2/app/code/Magento/Newsletter/Block/Subscribe.php) - - template: subscribe.phtml - - SQL: 0 (0.000000ms) -BLOCK 8bea601f3ca5d587e7a76de619f288d7 rendered in 23.162678 - - class: Magento\Cms\Block\Widget\Block (/php-module/magento/magento2/app/code/Magento/Cms/Block/Widget/Block.php) - - template: widget/static_block/default.phtml - - SQL: 3 (2.531478ms) -BLOCK footer_links rendered in 14.591008 - - class: Magento\Framework\View\Element\Html\Links (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Html/Links.php) - - template: (null) - - SQL: 0 (0.000000ms) -BLOCK privacy-policy-link rendered in 11.863441 - - class: Magento\Framework\View\Element\Html\Link\Current (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Html/Link/Current.php) - - template: (null) - - SQL: 0 (0.000000ms) -BLOCK search-term-popular-link rendered in 7.938110 - - class: Magento\Framework\View\Element\Html\Link\Current (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Html/Link/Current.php) - - template: (null) - - SQL: 0 (0.000000ms) -BLOCK catalog-search-advanced-link rendered in 6.655391 - - class: Magento\Framework\View\Element\Html\Link\Current (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Html/Link/Current.php) - - template: (null) - - SQL: 0 (0.000000ms) -BLOCK contact-us-link rendered in 11.836216 - - class: Magento\Framework\View\Element\Html\Link\Current (/php-module/magento/magento2/lib/internal/Magento/Framework/View/Element/Html/Link/Current.php) - - template: (null) - - SQL: 0 (0.000000ms) -BLOCK sales-guest-form-link rendered in 6.581037 - - class: Magento\Sales\Block\Guest\Link (/php-module/magento/magento2/app/code/Magento/Sales/Block/Guest/Link.php) - - template: (null) - - SQL: 0 (0.000000ms) -BLOCK store_switcher rendered in 33.869072 - - class: Magento\Store\Block\Switcher\Interceptor (/php-module/magento/magento2/var/generation/Magento/Store/Block/Switcher/Interceptor.php) - - template: switch/stores.phtml - - SQL: 0 (0.000000ms) -BLOCK absolute_footer rendered in 30.494419 - - class: Magento\Theme\Block\Html\Footer (/php-module/magento/magento2/app/code/Magento/Theme/Block/Html/Footer.php) - - template: html/absolute_footer.phtml - - SQL: 0 (0.000000ms) -BLOCK copyright rendered in 29.590832 - - class: Magento\Theme\Block\Html\Footer (/php-module/magento/magento2/app/code/Magento/Theme/Block/Html/Footer.php) - - template: html/copyright.phtml - - SQL: 0 (0.000000ms) From 5ad5fdc42b69bee5fa56ef4e751ff3e0cc02a1a6 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Fri, 25 Aug 2023 16:33:43 +0200 Subject: [PATCH 55/60] try building php for every ubuntu --- .github/workflows/main.yml | 114 +++++++++++++++++++------------------ 1 file changed, 58 insertions(+), 56 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bb22834..ad0f0d6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,64 +23,66 @@ env: PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - # debian-builds: - # if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') - # environment: build - # name: 'Building ${{ matrix.php-version }} for Debian ${{ matrix.debian-version }}' - # runs-on: ubuntu-latest - # strategy: - # fail-fast: false - # matrix: - # php-version: [php73, php74, php80, php81, php82, php83] - # debian-version: [buster] # [buster, bullseye, bookworm] - - # steps: - # - name: Clone Quanta PHP Module repository - # uses: actions/checkout@v3 - # with: - # path: php-module - - # - name: Clone Buildozer repository - # uses: actions/checkout@v3 - # with: - # ssh-key: ${{ secrets.BUILDOZER_DEPLOY_KEY }} - # repository: quanta-computing/buildozer - # ref: 'new-packages-worflow' - # persist-credentials: true - # path: tools - - # - name: Buildozering - # run: | - # cd tools - # ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -s ../php-module/extension/ -r 1.3.4 - - # - name: Upload packages as artifact - # uses: actions/upload-artifact@v3 - # with: - # name: debian-${{ matrix.debian-version }}-${{ matrix.php-version }}.tgz - # path: tools/debian/${{ matrix.debian-version }}/pkg/ - - # - name: Pelletesting - # run: | - # cd tools - # ./pelletesteuse -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -r 1.3.4 - - centos-builds: + builds: if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') environment: build - name: 'Building ${{ matrix.php-version }} for CentOS ${{ matrix.centos-version }}' + name: '[${{ matrix.os }}][${{ matrix.version }}] - Quanta Agent Builds' runs-on: ubuntu-latest + # needs: detect-version strategy: fail-fast: false matrix: - php-version: [php73, php74, php80, php81-remi] # php73, php74, php80, php81, php82, php83 - centos-version: [8] # 7, 8, 9 + # os: [debian, centos, ubuntu] + os: [ubuntu] + version: [buster, bullseye, bookworm, 7, 8, 9, jammy, kinetic, lunar] + php-version: [php73, php74, php80, php81, php82, php83] + exclude: + - os: debian + version: 7 + - os: debian + version: 8 + - os: debian + version: 9 + - os: debian + version: jammy + - os: debian + version: kinetic + - os: debian + version: lunar + - os: centos + version: buster + - os: centos + version: bullseye + - os: centos + version: bookworm + - os: centos + version: jammy + - os: centos + version: kinetic + - os: centos + version: lunar + - os: centos + - version: 9 + php-version: php73 + - os: ubuntu + version: buster + - os: ubuntu + version: bullseye + - os: ubuntu + version: bookworm + - os: ubuntu + version: 7 + - os: ubuntu + version: 8 + - os: ubuntu + version: 9 + steps: - - name: Clone Quanta PHP Module repository + - name: Clone Quanta Agent repository uses: actions/checkout@v3 with: - path: php-module + path: quanta-agent - name: Clone Buildozer repository uses: actions/checkout@v3 @@ -91,18 +93,18 @@ jobs: persist-credentials: true path: tools - - name: Build the PHP package + - name: Build monikor packages run: | cd tools - ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -s ../php-module/extension/ -r 1.3.4 + ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o ${{ matrix.os }} -v ${{ matrix.version }} -s ../quanta-php-module/extension/ -r 1.3.4 - name: Upload packages uses: actions/upload-artifact@v3 with: - name: centos-${{ matrix.centos-version }}-${{ matrix.php-version }}.tgz - path: tools/centos/${{ matrix.centos-version }}/pkg/ + name: ${{ matrix.os }}-${{ matrix.version }}_${{ matrix.php-version }}-quanta-mon-1.3.4.tgz + path: tools/${{ matrix.os }}/${{ matrix.version }}/pkg/ - - name: Pelletesting - run: | - cd tools - ./pelletesteuse -t ${{ matrix.php-version }}-quanta-mon -o centos -v ${{ matrix.centos-version }} -r 1.3.4 + # - name: Pelletesting + # run: | + # cd tools + # ./pelletesteuse -t ${{ matrix.php-version }}-quanta-mon -o debian -v ${{ matrix.debian-version }} -r 1.3.4 From 8a312f207e0c17145026f224c0024a77f9bd0283 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Fri, 25 Aug 2023 16:35:10 +0200 Subject: [PATCH 56/60] change the title to also have the php version --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ad0f0d6..ec36e56 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: builds: if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release') environment: build - name: '[${{ matrix.os }}][${{ matrix.version }}] - Quanta Agent Builds' + name: '[${{ matrix.os }}][${{ matrix.version }}][${{ matrix.php-version }}] - Quanta PHP Module Builds' runs-on: ubuntu-latest # needs: detect-version strategy: From 9d205ab22903fa7222dbf416bba4354fc55c78dd Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Fri, 25 Aug 2023 16:36:47 +0200 Subject: [PATCH 57/60] get the correct path for php-module --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ec36e56..c0432e2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -79,10 +79,10 @@ jobs: steps: - - name: Clone Quanta Agent repository + - name: Clone Quanta PHP module repository uses: actions/checkout@v3 with: - path: quanta-agent + path: quanta-php-module - name: Clone Buildozer repository uses: actions/checkout@v3 @@ -93,7 +93,7 @@ jobs: persist-credentials: true path: tools - - name: Build monikor packages + - name: Build php module packages run: | cd tools ./buildozer -t ${{ matrix.php-version }}-quanta-mon -o ${{ matrix.os }} -v ${{ matrix.version }} -s ../quanta-php-module/extension/ -r 1.3.4 From 450caee93a0989f08872663cb8663ac2972cfbcc Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Fri, 25 Aug 2023 16:47:33 +0200 Subject: [PATCH 58/60] all version of phps for all os --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c0432e2..7ea82fc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,8 +32,7 @@ jobs: strategy: fail-fast: false matrix: - # os: [debian, centos, ubuntu] - os: [ubuntu] + os: [debian, centos, ubuntu] version: [buster, bullseye, bookworm, 7, 8, 9, jammy, kinetic, lunar] php-version: [php73, php74, php80, php81, php82, php83] exclude: From 93d5cac793432148a0d2f3b6644ef84de38bfbf9 Mon Sep 17 00:00:00 2001 From: Julien Barritaud Date: Fri, 25 Aug 2023 16:49:55 +0200 Subject: [PATCH 59/60] fix workflow --- .github/workflows/main.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7ea82fc..8c0e392 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -60,9 +60,6 @@ jobs: version: kinetic - os: centos version: lunar - - os: centos - - version: 9 - php-version: php73 - os: ubuntu version: buster - os: ubuntu From 08ec0f1333b61d225f3abae5bf8ee9b22f197f2c Mon Sep 17 00:00:00 2001 From: Matthieu Rosinski Date: Fri, 25 Aug 2023 23:50:05 +0200 Subject: [PATCH 60/60] rebuild ubuntu --- .github/workflows/main.yml | 83 +++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8c0e392..a7b47f9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,9 +1,6 @@ name: Quanta PHP Module builder on: - push: - branches: - - 'master' pull_request: branches: - '**' @@ -32,46 +29,48 @@ jobs: strategy: fail-fast: false matrix: - os: [debian, centos, ubuntu] - version: [buster, bullseye, bookworm, 7, 8, 9, jammy, kinetic, lunar] + # os: [debian, centos, ubuntu] + os: [ubuntu] + version: [jammy, kinetic, lunar] + # version: [buster, bullseye, bookworm, 7, 8, 9, jammy, kinetic, lunar] php-version: [php73, php74, php80, php81, php82, php83] - exclude: - - os: debian - version: 7 - - os: debian - version: 8 - - os: debian - version: 9 - - os: debian - version: jammy - - os: debian - version: kinetic - - os: debian - version: lunar - - os: centos - version: buster - - os: centos - version: bullseye - - os: centos - version: bookworm - - os: centos - version: jammy - - os: centos - version: kinetic - - os: centos - version: lunar - - os: ubuntu - version: buster - - os: ubuntu - version: bullseye - - os: ubuntu - version: bookworm - - os: ubuntu - version: 7 - - os: ubuntu - version: 8 - - os: ubuntu - version: 9 + # exclude: + # - os: debian + # version: 7 + # - os: debian + # version: 8 + # - os: debian + # version: 9 + # - os: debian + # version: jammy + # - os: debian + # version: kinetic + # - os: debian + # version: lunar + # - os: centos + # version: buster + # - os: centos + # version: bullseye + # - os: centos + # version: bookworm + # - os: centos + # version: jammy + # - os: centos + # version: kinetic + # - os: centos + # version: lunar + # - os: ubuntu + # version: buster + # - os: ubuntu + # version: bullseye + # - os: ubuntu + # version: bookworm + # - os: ubuntu + # version: 7 + # - os: ubuntu + # version: 8 + # - os: ubuntu + # version: 9 steps: