Skip to content

Commit 52467ed

Browse files
committed
Try NO_PROFILE_COUNTERS to 0
1 parent 8369bb4 commit 52467ed

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

library/profile/gmon.c

+13-12
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <unistd.h>
1313

1414
#define SCALE_1_TO_1 0x10000L
15+
#define MIN_OS_VERSION 52
1516

1617
#include "profile_gmon.h"
1718

@@ -196,8 +197,8 @@ void moncleanup(void) {
196197
}
197198

198199
void mongetpcs(uint32 *lowpc, uint32 *highpc) {
199-
struct Library *ElfBase = NULL;
200-
struct ElfIFace *IElf = NULL;
200+
struct Library *__ElfBase = NULL;
201+
struct ElfIFace *__IElf = NULL;
201202
struct Process *self;
202203
BPTR seglist;
203204
Elf32_Handle elfHandle;
@@ -208,10 +209,10 @@ void mongetpcs(uint32 *lowpc, uint32 *highpc) {
208209
*lowpc = 0;
209210
*highpc = 0;
210211

211-
ElfBase = OpenLibrary("elf.library", 0L);
212-
if (ElfBase) {
213-
IElf = (struct ElfIFace *) GetInterface(ElfBase, "main", 1, NULL);
214-
if (IElf) {
212+
__ElfBase = OpenLibrary("elf.library", MIN_OS_VERSION);
213+
if (__ElfBase) {
214+
__IElf = (struct ElfIFace *) GetInterface(__ElfBase, "main", 1, NULL);
215+
if (__IElf) {
215216
self = (struct Process *) FindTask(0);
216217
seglist = GetProcSegList(self, GPSLF_CLI | GPSLF_SEG);
217218

@@ -236,13 +237,13 @@ void mongetpcs(uint32 *lowpc, uint32 *highpc) {
236237
}
237238
}
238239

239-
if (IElf) {
240-
DropInterface((struct Interface *) IElf);
241-
IElf = NULL;
240+
if (__IElf) {
241+
DropInterface((struct Interface *) __IElf);
242+
__IElf = NULL;
242243
}
243-
if (ElfBase) {
244-
CloseLibrary(ElfBase);
245-
ElfBase = NULL;
244+
if (__ElfBase) {
245+
CloseLibrary(__ElfBase);
246+
__ElfBase = NULL;
246247
}
247248
}
248249

misc/amigaos.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -448,4 +448,6 @@ do \
448448

449449
/* This target uses the amigaos.opt file. */
450450
#define TARGET_USES_AMIGAOS_OPT 1
451-
#define NO_PROFILE_COUNTERS 1
451+
452+
#undef NO_PROFILE_COUNTERS
453+
#define NO_PROFILE_COUNTERS 0

0 commit comments

Comments
 (0)