Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
tests:
name: 'Tests'
strategy:
fail-fast: false
matrix:
include:
- php: '8.4.0'
Expand Down
22 changes: 0 additions & 22 deletions memprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -1765,28 +1765,6 @@ PHP_FUNCTION(memprof_memory_get_peak_usage)
}
/* }}} */

/* {{{ proto bool memprof_enable()
Enables memprof */
PHP_FUNCTION(memprof_enable)
{
if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE) {
return;
}

if (MEMPROF_G(profile_flags).enabled) {
zend_throw_exception(EG(exception_class), "memprof_enable(): memprof is already enabled", 0);
return;
}

zend_error(E_WARNING, "Calling memprof_enable() manually may not work as expected because of PHP optimizations. Prefer using MEMPROF_PROFILE=1 as environment variable, GET, or POST");

MEMPROF_G(profile_flags).enabled = 1;
memprof_enable(&MEMPROF_G(profile_flags));

RETURN_TRUE;
}
/* }}} */

/* {{{ proto bool memprof_disable()
Disables memprof */
PHP_FUNCTION(memprof_disable)
Expand Down
2 changes: 0 additions & 2 deletions memprof.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ function memprof_enabled(): bool {}

function memprof_enabled_flags(): array {}

function memprof_enable(): bool {}

function memprof_disable(): bool {}

function memprof_dump_array(): array {}
Expand Down
6 changes: 1 addition & 5 deletions memprof_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: afb43b76aec85442c7267aba0b45bfd00d5c8cf1 */
* Stub hash: a8dec2138f524b2d8e0e5e07631e4965250fbbba */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_memprof_enabled, 0, 0, _IS_BOOL, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_memprof_enabled_flags, 0, 0, IS_ARRAY, 0)
ZEND_END_ARG_INFO()

#define arginfo_memprof_enable arginfo_memprof_enabled

#define arginfo_memprof_disable arginfo_memprof_enabled

#define arginfo_memprof_dump_array arginfo_memprof_enabled_flags
Expand All @@ -25,7 +23,6 @@ ZEND_END_ARG_INFO()

ZEND_FUNCTION(memprof_enabled);
ZEND_FUNCTION(memprof_enabled_flags);
ZEND_FUNCTION(memprof_enable);
ZEND_FUNCTION(memprof_disable);
ZEND_FUNCTION(memprof_dump_array);
ZEND_FUNCTION(memprof_dump_callgrind);
Expand All @@ -36,7 +33,6 @@ ZEND_FUNCTION(memprof_version);
static const zend_function_entry ext_functions[] = {
ZEND_FE(memprof_enabled, arginfo_memprof_enabled)
ZEND_FE(memprof_enabled_flags, arginfo_memprof_enabled_flags)
ZEND_FE(memprof_enable, arginfo_memprof_enable)
ZEND_FE(memprof_disable, arginfo_memprof_disable)
ZEND_FE(memprof_dump_array, arginfo_memprof_dump_array)
ZEND_FE(memprof_dump_callgrind, arginfo_memprof_dump_callgrind)
Expand Down
1 change: 0 additions & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
<file name="INTERNALS.md" role="doc" />
<file name="README.md" role="doc" />
<dir name="tests">
<file name="001.phpt" role="test" />
<file name="002.phpt" role="test" />
<file name="003.phpt" role="test" />
<file name="004.phpt" role="test" />
Expand Down
21 changes: 0 additions & 21 deletions tests/001.phpt

This file was deleted.

Loading
Loading