diff options
author | fche <fche> | 2005-09-28 21:23:12 +0000 |
---|---|---|
committer | fche <fche> | 2005-09-28 21:23:12 +0000 |
commit | ed10c6397cc27ad161c7fcd5242c38efd89dc5ee (patch) | |
tree | 26eb4a7e8d7176e93e6bcde03599c8e96abc7828 /translate.cxx | |
parent | e0d31311729955985b3142c1c7d08cf461192469 (diff) | |
download | systemtap-steved-ed10c6397cc27ad161c7fcd5242c38efd89dc5ee.tar.gz systemtap-steved-ed10c6397cc27ad161c7fcd5242c38efd89dc5ee.tar.xz systemtap-steved-ed10c6397cc27ad161c7fcd5242c38efd89dc5ee.zip |
2005-09-28 Frank Ch. Eigler <fche@elastic.org>
PR 1182.
* main.cxx (main): Support -D macro-setting option.
* stap.1.in: Document it and related macros.
* buildrun.cxx (compile_pass): Emit macro definitions.
* translate.cxx (translate_pass): Guard limit macros with #ifdef.
Eliminate MAXCONCURRENCY macro.
* elaborate.h (systemtap_session): Add "macros" field.
* parse.cxx (parse_if_statement): Clear "elseblock" if needed.
2005-09-28 Frank Ch. Eigler <fche@elastic.org>
PR 1182.
* systemtap.samples/control_limits.*: New test.
Diffstat (limited to 'translate.cxx')
-rw-r--r-- | translate.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/translate.cxx b/translate.cxx index cc4b58c5..a7caf0bd 100644 --- a/translate.cxx +++ b/translate.cxx @@ -670,7 +670,7 @@ c_unparser::emit_common_header () o->newline(-1) << "} function_" << c_varname (fd->name) << ";"; } o->newline(-1) << "} locals [MAXNESTING];"; - o->newline(-1) << "} contexts [MAXCONCURRENCY];" << endl; + o->newline(-1) << "} contexts [NR_CPUS];" << endl; emit_map_type_instantiations (); } @@ -2376,12 +2376,21 @@ translate_pass (systemtap_session& s) // This is at the very top of the file. s.op->line() << "#define TEST_MODE " << (s.test_mode ? 1 : 0) << endl; + s.op->newline() << "#ifndef MAXNESTING"; s.op->newline() << "#define MAXNESTING 30"; - s.op->newline() << "#define MAXCONCURRENCY NR_CPUS"; + s.op->newline() << "#endif"; + s.op->newline() << "#ifndef MAXSTRINGLEN"; s.op->newline() << "#define MAXSTRINGLEN 128"; + s.op->newline() << "#endif"; + s.op->newline() << "#ifndef MAXTRYLOCK"; s.op->newline() << "#define MAXTRYLOCK 20"; + s.op->newline() << "#endif"; + s.op->newline() << "#ifndef MAXACTION"; s.op->newline() << "#define MAXACTION 1000"; + s.op->newline() << "#endif"; + s.op->newline() << "#ifndef MAXMAPENTRIES"; s.op->newline() << "#define MAXMAPENTRIES 2048"; + s.op->newline() << "#endif"; // impedance mismatch s.op->newline() << "#define STP_STRING_SIZE MAXSTRINGLEN"; |