Displaying 9 results from an estimated 9 matches for "callflag".
Did you mean:
call_log
2009 Mar 03
1
profiler and loops
...not know what to do to improve on the script.
I have had a quick look in the code, and here are a few thoughts:
in the function "doprof" in eval.c, this loop write the call stack on
the profiler file:
for (cptr = R_GlobalContext; cptr; cptr = cptr->nextcontext) {
if ((cptr->callflag & (CTXT_FUNCTION | CTXT_BUILTIN))
&& TYPEOF(cptr->call) == LANGSXP) {
SEXP fun = CAR(cptr->call);
if (!newline) newline = 1;
fprintf(R_ProfileOutfile, "\"%s\" ",
TYPEOF(fun) == SYMSXP ? CHAR(PRINTNAME(fun)) :
&q...
2003 Mar 26
0
Rprof/UseMethod
...iling adds an extra
# evaluation context around builtins and that can confuse things that
# don't take this into account. I unfortunately don't have time to
# track this properly now, but on a quick glance it looks like changing
cptr = R_GlobalContext;
if ( !(cptr->callflag & CTXT_FUNCTION) || cptr->cloenv != env)
error("UseMethod used in an inappropriate fashion");
#
# it two places in objects.c to
#
cptr = R_GlobalContext;
if (cptr->callflag == CTXT_BUILTIN)
cptr = cptr->nextcontext;
if ( !(cpt...
2002 Jul 19
1
Rprof and setMethod conflict?
I noticed this oddity about R profiling and setMethod.
First, I "test out" Rprof.
> require(methods)
Loading required package: methods
[1] TRUE
>
> Rprof("test.out")
> data.frame("a")
X.a.
1 a
> Rprof(NULL)
So far, so good. Next, I define myClass.
> setClass("myClass", representation(mySlot = "numeric"))
[1]
1997 Aug 05
1
R-beta: Characters in .C
I am having some difficulties using dynamically loaded
C functions on a Sparc 10 with R compiled
using cc (both R-0.49 and R-0.50). I get sporadic errors with the
error message:
Error: character variables must be duplicated in .C/.Fortran,
with C functions which pass character variables.
my C functions look like: anyfunc(char **filename, other variables )
This error message appears about 25%
1997 Aug 05
1
R-beta: Characters in .C
I am having some difficulties using dynamically loaded
C functions on a Sparc 10 with R compiled
using cc (both R-0.49 and R-0.50). I get sporadic errors with the
error message:
Error: character variables must be duplicated in .C/.Fortran,
with C functions which pass character variables.
my C functions look like: anyfunc(char **filename, other variables )
This error message appears about 25%
2020 Feb 26
1
Profiling: attributing costs to place of invocation (instead of place of evaluation)?
..._Profiling)
???? lineprof(buf, R_getCurrentSrcref());
+??? SEXP sysparent = NULL;
+
???? for (cptr = R_GlobalContext; cptr; cptr = cptr->nextcontext) {
+??? if (sysparent != NULL && cptr->cloenv != sysparent &&
cptr->sysparent != sysparent) continue;
???? if ((cptr->callflag & (CTXT_FUNCTION | CTXT_BUILTIN))
???? ??? && TYPEOF(cptr->call) == LANGSXP) {
???? ??? SEXP fun = CAR(cptr->call);
@@ -292,6 +295,8 @@
???? ??? ??? else
???? ??? ??? lineprof(buf, cptr->srcref);
???? ??? }
+
+??? ??? sysparent = cptr->sysparent;
???? ??? }
???? }
??...
2016 Jun 04
1
RProfmem output format
...4 :
2040 :"raw"
This was/is because C function R_OutputStackTrace() - part of
src/main/memory.c - looks like:
static void R_OutputStackTrace(FILE *file)
{
int newline = 0;
RCNTXT *cptr;
for (cptr = R_GlobalContext; cptr; cptr = cptr->nextcontext) {
if ((cptr->callflag & (CTXT_FUNCTION | CTXT_BUILTIN))
&& TYPEOF(cptr->call) == LANGSXP) {
SEXP fun = CAR(cptr->call);
if (!newline) newline = 1;
fprintf(file, "\"%s\" ",
TYPEOF(fun) == SYMSXP ? CHAR(PRINTNAME(fun)) :...
2004 Jun 28
2
Problem with hasArg and the ... argument (PR#7027)
Full_Name: Jelle Goeman
Version: 1.9.0
OS: mingw32, windows 2000
Submission from: (NULL) (145.88.209.33)
Hi Everyone,
I get very strange results using the function hasArg with the ... function
argument. In my own function:
> gt <- globaltest(X,Y)
> sampling(gt)
works fine, but
> sampling(globaltest(X,Y))
results in:
Error in eval(expr, envir, enclos) : "missing"
2011 Aug 14
0
Improved version of Rprofmem
...rtingOutfile;
-static R_size_t R_MemReportingThreshold;
+ newline = R_MemReportingToTerminal | R_MemDetailsReporting;
-static void R_OutputStackTrace(FILE *file)
-{
- int newline = 0;
- RCNTXT *cptr;
-
for (cptr = R_GlobalContext; cptr; cptr = cptr->nextcontext) {
if ((cptr->callflag & (CTXT_FUNCTION | CTXT_BUILTIN))
&& TYPEOF(cptr->call) == LANGSXP) {
SEXP fun = CAR(cptr->call);
if (!newline) newline = 1;
- fprintf(file, "\"%s\" ",
- TYPEOF(fun) == SYMSXP ? CHAR(PRINTNAME(fun)) :
- "<Anonymous>&qu...