Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Net mutex #1523

Merged
merged 9 commits into from
Sep 11, 2017
Merged

Net mutex #1523

merged 9 commits into from
Sep 11, 2017

Conversation

grgustaf
Copy link
Contributor

@grgustaf grgustaf commented Sep 8, 2017

No description provided.

ZJS_PRINT
#define FTRACE_JSAPI \
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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>
@jprestwo
Copy link
Contributor

+1

@grgustaf grgustaf merged commit 2a71022 into intel:master Sep 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants