Skip to content

Commit

Permalink
CogVM source as per VMMaker.oscog-eem.3031
Browse files Browse the repository at this point in the history
macOS: Fix a regression in sqMacUnixExternalPrims.m.

Slang: exclude CogMIPSELCompiler from generation.

Cogit: reimplement profiling support for AndreasSystemProfiler:

- check the profile clock *after* a primitive has succeeded, not before.
  testing before is clearly broken (what was I thinking?!?!?).
- use the same support that ioHighResClock uses; hence no AArch32 support for
  now (but we could put a SIGSEGV handler around an initial invocation to
  check if support is available).
- Add a new operand type for CogRTLOpcodes; L means "live registers" and allows
  the code generators to generate tight code for MovePerfCnt64RRL &
  MovePerfCnt64RL, avoiding saving registers that are not live.
- rewrite compileInterpreterPrimitive:flags: to split off the sideways call,
  and make the flow through a normal call, retry, prodflie sample sequence.

Frame printing: go some way to printing strings better for arg fields of a
frame.  The issue is string arguments, e.g. those with all of ASCII using
in translate:from:to:using:

Nuke the longRunningPrimitive sampling support.  it' a poor idea compared to
Andreas' accurate primitive profiling.
  • Loading branch information
eliotmiranda committed Aug 6, 2021
1 parent ae0d29f commit 46d713f
Show file tree
Hide file tree
Showing 73 changed files with 10,070 additions and 181,302 deletions.
30,759 changes: 0 additions & 30,759 deletions nsspursrc/vm/cogitMIPSEL.c

This file was deleted.

13 changes: 13 additions & 0 deletions platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m
Expand Up @@ -199,6 +199,9 @@
return NULL;
#endif

#if 0 // This seems like the right thing to do but it breaks ioLoadModule
// ioLoadModule for system dylibs found along the system path(2).
// Instead, filter-out noise errors below
if (stat(libName, &buf)) {
dprintf((stderr, "tryLoadingLinked(%s) does not exist\n", libName));
return 0;
Expand All @@ -207,6 +210,7 @@
dprintf((stderr, "tryLoadingLinked(%s) is a directory\n", libName));
return 0;
}
#endif

handle = dlopen(libName, RTLD_NOW | RTLD_GLOBAL);
#if DEBUG
Expand All @@ -215,6 +219,15 @@
#endif
if (!handle) {
const char *why = dlerror();
// filter out failures due to non-existent libraries
if (stat(libName, &buf)) {
dprintf((stderr, "tryLoadingLinked(%s) does not exist\n", libName));
return 0;
}
else if (S_ISDIR(buf.st_mode)) {
dprintf((stderr, "tryLoadingLinked(%s) is a directory\n", libName));
return 0;
}
#if PRINT_DL_ERRORS // In practice these reasons are too important to hide
fprintf(stderr, "tryLoadingLinked(%s):\t%s\n", libName, why);
#else
Expand Down
2 changes: 1 addition & 1 deletion spur64src/vm/cogit.h
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.3026 uuid: 88faccd6-8d42-4e14-9ad3-104e5a5bc8d9
CCodeGenerator VMMaker.oscog-eem.3031 uuid: 51e5e6bf-af1a-465a-bcff-a8874301d2ab
*/


Expand Down

0 comments on commit 46d713f

Please sign in to comment.