-
Notifications
You must be signed in to change notification settings - Fork 64
Conversation
ZJS_PRINT | ||
#define FTRACE_JSAPI \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this just move into ZJS_DECL_FUNC? Then you it would be in all modules without having to call it everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not the way ZJS_DECL_FUNC is done currently because it doesn't include the opening brace of the function, so you can't add statements to the function. It could perhaps go into ZJS_VALIDATE_ARGS though.
// enable to use asserts even in release mode, e.g. for terse debugging | ||
#if 0 | ||
#define USE_ASSERT | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this be better to add as a make flag rather than requiring editing the header file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it would be really nice if you could specify a comma separated list of all the different debug options, and/or 'all' for all of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can feel free to submit such a patch. :)
I don't think it makes much of a difference actually, this is very easy. It's on by default in DEBUG anyway, usually you would not want this on in release build.
But FYI for FTRACE I very specifically designed it the way I did so that you can turn on function tracing per-file by making the define in that file, instead of enabling it for the whole project and get way too much output. Yes there are fancier ways to handle it, again - feel free. This is quick and good enough for what I need.
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
Then check for this closing flag to know that write will fail and not bother attempting it. Fixes intel#1512 (the follow-on report of failure on A101 w/ Ethernet) Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
Way too much code was being locked in zjs_callbacks.c and it was causing deadlocks. It's still probably possible, this could be refined further - for example jerry_call_function is still getting called within a CB_LOCK. Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
This way, we get tracing in all JS APIs (with arguments that get validated anyway) automatically. We'll still need to add FTRACE_JSAPI to functions w/o arguments, and enable it per-file as desired. Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
+1 |
No description provided.