Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
aports
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
816
Issues
816
List
Boards
Labels
Milestones
Merge Requests
55
Merge Requests
55
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
aports
Commits
886cd3a2
Commit
886cd3a2
authored
Jun 14, 2019
by
Andy Postnikov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing/php7-tideways_xhprof: upgrade to 5.0_beta4
parent
cdefa881
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
139 deletions
+5
-139
73.patch
testing/php7-tideways_xhprof/73.patch
+0
-61
74.patch
testing/php7-tideways_xhprof/74.patch
+0
-70
APKBUILD
testing/php7-tideways_xhprof/APKBUILD
+5
-8
No files found.
testing/php7-tideways_xhprof/73.patch
deleted
100644 → 0
View file @
cdefa881
From 6670474519ddd1852276bd8231d1387f8bab0474 Mon Sep 17 00:00:00 2001
From: Benjamin Eberlei <kontakt@beberlei.de>
Date: Thu, 7 Feb 2019 17:46:10 +0100
Subject: [PATCH 1/2] Add #include "stdint.h" to please Alpine/Musl?
---
timer.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/timer.h b/timer.h
index ecd940f..8db0440 100644
--- a/timer.h
+++ b/timer.h
@@ -11,6 +11,7 @@
#include "win32/getrusage.h"
#else
+#include "stdint.h"
#include <sys/time.h>
#include <sys/resource.h>
#endif
From 4f4ebbbaf2347436c18725e11bf3d03d6781ba05 Mon Sep 17 00:00:00 2001
From: Benjamin Eberlei <kontakt@beberlei.de>
Date: Fri, 8 Feb 2019 19:46:05 +0100
Subject: [PATCH 2/2] Move type definition around.
---
timer.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/timer.h b/timer.h
index 8db0440..fd535e7 100644
--- a/timer.h
+++ b/timer.h
@@ -11,7 +11,6 @@
#include "win32/getrusage.h"
#else
-#include "stdint.h"
#include <sys/time.h>
#include <sys/resource.h>
#endif
@@ -54,6 +53,9 @@
static zend_always_inline uint64 time_milliseconds(int source, double timebase_f
struct timespec s;
uint32 a, d;
uint64 val;
+#if defined(__i386__)
+ int64_t ret;
+#endif
switch (source) {
#if HAVE_CLOCK_GETTIME
@@ -77,7 +79,6 @@
static zend_always_inline uint64 time_milliseconds(int source, double timebase_f
#endif
case TIDEWAYS_XHPROF_CLOCK_TSC:
#if defined(__i386__)
- int64_t ret;
__asm__ volatile("rdtsc" : "=A"(ret));
return ret;
#elif defined(__x86_64__) || defined(__amd64__)
testing/php7-tideways_xhprof/74.patch
deleted
100644 → 0
View file @
cdefa881
From 520315b6b12f9cd0e1f0d5532a60d80039a25e2d Mon Sep 17 00:00:00 2001
From: Benjamin Eberlei <kontakt@beberlei.de>
Date: Sun, 17 Feb 2019 22:25:26 +0100
Subject: [PATCH] Add ARM and s309 architectures to clock timing.
---
timer.h | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/timer.h b/timer.h
index fd535e7..9c1f2ff 100644
--- a/timer.h
+++ b/timer.h
@@ -38,8 +38,14 @@
static zend_always_inline uint64 current_timestamp() {
* @author cjiang
*/
static zend_always_inline uint64 time_milliseconds(int source, double timebase_factor) {
-#ifdef __APPLE__
+#if defined(_APPLE__)
return mach_absolute_time() / timebase_factor;
+#elif defined(__s390__) // Covers both s390 and s390x.
+ uint64_t tsc;
+ // Return the CPU clock.
+ asm("stck %0" : "=Q" (tsc) : : "cc");
+
+ return tsc;
#elif defined(PHP_WIN32)
LARGE_INTEGER count;
@@ -49,12 +55,14 @@
static zend_always_inline uint64 time_milliseconds(int source, double timebase_f
}
return (double)(count.QuadPart) / timebase_factor;
-#else
+#elif defined(__x86_64__) || defined(__amd64__)
struct timespec s;
uint32 a, d;
uint64 val;
-#if defined(__i386__)
+#elif defined(__i386__)
int64_t ret;
+#elif defined(__ARM_ARCH)
+ struct timeval tv;
#endif
switch (source) {
@@ -84,17 +92,19 @@
static zend_always_inline uint64 time_milliseconds(int source, double timebase_f
#elif defined(__x86_64__) || defined(__amd64__)
asm volatile("rdtsc" : "=a" (a), "=d" (d));
(val) = ((uint64)a) | (((uint64)d)<<32);
+ return val / timebase_factor;
#elif defined(__powerpc__) || defined(__ppc__)
asm volatile ("mftb %0" : "=r" (val));
+ return val / timebase_factor;
+#elif defined(__ARM_ARCH)
+ gettimeofday(&tv, NULL);
+ return (tv.tv_sec) * 1000000 + tv.tv_usec;
#else
-#error You need to define CycleTimer for your OS and CPU
+ return 0;
#endif
- return val / timebase_factor;
-
default:
return 0;
}
-#endif
}
/**
testing/php7-tideways_xhprof/APKBUILD
View file @
886cd3a2
...
...
@@ -3,18 +3,17 @@
pkgname
=
php7-tideways_xhprof
_pkgext
=
tideways_xhprof
_pkgreal
=
php-xhprof-extension
pkgver
=
5.0_beta
3
pkgver
=
5.0_beta
4
_pkgver
=
${
pkgver
/_/-
}
pkgrel
=
4
pkgrel
=
0
pkgdesc
=
"Modern XHProf compatible Profiler for PHP 7"
url
=
"http://tideways.io"
arch
=
"
x86_64"
# fails to build
arch
=
"
all !s390x"
# fails to build https://github.com/tideways/php-xhprof-extension/issues/72
license
=
"Apache-2.0"
depends
=
"php7"
makedepends
=
"php7-dev autoconf"
source
=
"
$pkgname
-
$pkgver
.tar.gz::https://github.com/tideways/php-xhprof-extension/archive/v
$_pkgver
.tar.gz
73.patch
74.patch"
"
builddir
=
"
$srcdir
/
$_pkgreal
-
$_pkgver
"
build
()
{
...
...
@@ -35,6 +34,4 @@ package() {
echo
"extension=
$_pkgext
.so"
>
"
$pkgdir
"
/etc/php7/conf.d/
$_pkgext
.ini
}
sha512sums
=
"5b682ed8cda21236c54c3161645620ba06f14478fcf1b45684788b742e47d63419b3e3f74da7d3e376ce5fafeb215ed40d080aaac0c2a8799315f83c877e3110 php7-tideways_xhprof-5.0_beta3.tar.gz
2dfee43f28d7872f08688b354b25c177bb16a5474d2df999be0155362998841c1afa0b5adaf41d016be8c9e50f669d0f69bd56891d4e1e4ef999b9ea2118dfa8 73.patch
202c2f343d5b52479407b7e74e3fb6e9c7db7886fc1e72818ce9f00c4fab1934f1dee94829221a354caaed63299b9d0ca6c477dae9b3aeb5d68381abdcb6ba78 74.patch"
sha512sums
=
"ee4e0a2e51b5d4c7babae92378bfc6b06794eb648494a3b3006c3d41f034b21524aa02cbbd60ec4bf517d73c657a6bb11706d484fb2414eecb530a1f2969e940 php7-tideways_xhprof-5.0_beta4.tar.gz"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment