View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000476 | LDMud 3.3 | Runtime | public | 2006-06-28 10:48 | 2022-10-06 20:11 |
| Reporter | fufu | Assigned To | fufu | ||
| Priority | normal | Severity | tweak | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Summary | 0000476: Improve eval statistics gathering (patch) | ||||
| Description | This patch adds calls to mark_start_evaluation() and mark_end_evaluation() for external master applies, calls to logon() and erq_send callbacks. It also adds a mark_end_evaluation() in the global error handler | ||||
| Additional Information | there are some other places which may or may not be toplevel evaluations: telnet negotiation hook - I don't know which of the calls are toplevel and which might be triggered while executing code (say, by input_to) noecho hook - same. erq stop hook - called by attach_erq_demon, is it also called at the top level? tls callbacks - didn't look further | ||||
| Tags | No tags attached. | ||||
| Attached Files | improve-statistics.patch (2,457 bytes)
Index: object.c
===================================================================
--- object.c (revision 2306)
+++ object.c (working copy)
@@ -921,12 +921,14 @@
object_t *save = current_object;
current_object = ob;
+ mark_start_evaluation();
ret = apply(STR_LOGON, ob, 0);
if (ret == 0)
{
errorf("Could not find %s() on the player %s\n", get_txt(STR_LOGON), get_txt(ob->name));
/* NOTREACHED */
}
+ mark_end_evaluation();
current_object = save;
} /* logon_object() */
Index: comm.c
===================================================================
--- comm.c (revision 2306)
+++ comm.c (working copy)
@@ -2860,8 +2860,10 @@
assigned_eval_cost = eval_cost = user->call_out_cost;
}
RESET_LIMITS;
+ mark_start_evaluation();
secure_callback_lambda(erqp, num_arg);
user->call_out_cost = eval_cost;
+ mark_end_evaluation();
if (!keep_handle || (ob->flags & O_DESTRUCTED))
{
free_svalue(erqp);
Index: backend.c
===================================================================
--- backend.c (revision 2306)
+++ backend.c (working copy)
@@ -449,6 +449,7 @@
/*
* We come here after errors, and have to clear some global variables.
*/
+ mark_end_evaluation();
clear_state();
flush_all_player_mess();
prevent_object_cleanup = MY_FALSE;
Index: interpret.c
===================================================================
--- interpret.c (revision 2306)
+++ interpret.c (working copy)
@@ -17334,6 +17334,8 @@
save_csp = csp;
if (setjmp(error_recovery_info.con.text))
{
+ if (external)
+ mark_end_evaluation();
secure_apply_error(save_sp - num_arg, save_csp, external);
printf("%s Error in master_ob->%s()\n", time_stamp(), get_txt(fun));
debug_message("%s Error in master_ob->%s()\n", time_stamp(), get_txt(fun));
@@ -17341,7 +17343,11 @@
}
else
{
+ if (external)
+ mark_start_evaluation();
result = sapply_int(fun, master_ob, num_arg, MY_TRUE, MY_FALSE);
+ if (external)
+ mark_end_evaluation();
}
/* Free the reserve if we used it */
| ||||
|
|
The category is wrong. Should be 'runtime'. Sorry. |
|
|
For determining whether telnet/noecho hooks are toplevel evaluations it's related to 0000534, because error handling has to be different in these cases, too. |
|
|
Mostly done in svn rev 2500. A note regarding erq callbacks: - most of the erq callbacks are asynchronous - if triggered by attach_erq_demon, stop_erq_demon will start a new evaluation for the stale_erq calls anyway. might be worth fixing. I still haven't looked at the TLS callbacks. |
|
|
(I might pick this up again, but for now I have no idea what the current state of tracking evaluations is.) |
|
|
My suggestion is to close it for the time being until you want to get back to it. |
|
|
TLS callback handling should be fixed in 3.6.3 (using backend_callback() function). |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2006-06-28 10:48 | fufu | New Issue | |
| 2006-06-28 10:48 | fufu | File Added: improve-statistics.patch | |
| 2006-06-28 10:50 | fufu | Note Added: 0000510 | |
| 2008-07-02 02:33 | fufu | Relationship added | child of 0000477 |
| 2008-07-02 02:33 | fufu | Status | new => assigned |
| 2008-07-02 02:33 | fufu | Assigned To | => fufu |
| 2008-07-02 02:42 | Gnomi | Relationship added | related to 0000534 |
| 2008-07-02 02:44 | Gnomi | Note Added: 0000651 | |
| 2008-07-02 03:17 | fufu | Category | Compilation, Installation => Runtime |
| 2008-07-02 03:19 | Gnomi | Note Edited: 0000651 | |
| 2009-01-17 07:09 | fufu | Note Added: 0000914 | |
| 2009-01-17 07:48 | fufu | Relationship added | related to 0000600 |
| 2021-04-08 22:29 | fufu | Assigned To | fufu => |
| 2021-04-08 22:29 | fufu | Status | assigned => new |
| 2021-04-08 22:33 | fufu | Note Added: 0002577 | |
| 2021-04-09 07:04 | zesstra | Assigned To | => fufu |
| 2021-04-09 07:04 | zesstra | Status | new => assigned |
| 2021-04-09 07:04 | zesstra | Note Added: 0002580 | |
| 2022-10-06 20:11 | Gnomi | Status | assigned => resolved |
| 2022-10-06 20:11 | Gnomi | Resolution | open => fixed |
| 2022-10-06 20:11 | Gnomi | Note Added: 0002697 |