Re: [v8-users] How Date.now() function value is returned (Is it from kernel of v8 engine has its own implementation)
Yes gin has its own implementation of time apart from default-platform. I have one more concern. How can i implement my own javascript API? Basically I am thinking to create two javascript API which calls two respective calls from my shared library (external). Instead of creating two new api's is there any other method from JavaScript which calls my external library functions. I dont want to fork processes from javascript to execute my library functions since I am planning to profile chrome browser. Regards, K Abhishek On Thu, Jun 21, 2018 at 1:34 PM Jakob Kummerow wrote: > gin provides its own v8::Platform implementation, overriding the default > platform. > > On Thu, Jun 21, 2018 at 9:55 AM Abhishek Kanike < > kai.dranzer32...@gmail.com> wrote: > >> Hi Jakob and v8-users, >> I have following observations on printing logs in v8 and date.now call >> trace. >> >>1. *Logs in v8:* >> >>*printf* and *std::cout* were not outputting any logs in adb logcat. >>I tried redirecting stdio logs to logcat by following commands - >> >>$ adb shell stop$ adb shell setprop log.redirect-stdio true$ adb shell >> start >> >>But still logs were not getting displayed in adb logcat. So I used >>android log library. Following is the procedure >> >>- Import header file: >> >> #if defined(V8_OS_ANDROID) >> #include >> #endif >> >> - Print log: >> >> #if defined(V8_OS_ANDROID) >> __android_log_print(ANDROID_LOG_INFO, "", ""); >> #endif >> >> >>2. Date.now() final system call: >>Date.now() calls *V8Platform::CurrentClockTimeMillis()* from* >>src/gin/v8_platform.cc *---> *Time::Now() *from >>*src/base/time/time.cc* ---> *getTimeofDay() *rather than >> *base::OS::TimeCurrentMillis. >>*Can anyone explain this behaviour? >> >> Regards, >> K Abhishek >> >> >> >> On Mon, Jun 18, 2018 at 7:07 PM Jakob Kummerow >> wrote: >> >>> Sure, just use printf or std::cout << "print\n". I don't know whether >>> adb logcat has any special requirements. >>> >>> On Mon, Jun 18, 2018 at 3:48 PM Abhishek Kanike < >>> kai.dranzer32...@gmail.com> wrote: >>> Jakob, Thanks for quick reply. That's a good point, should have tried with gdb. Will check with that. Is there a way to add logs in v8 source code, it will be lot faster to debug. In cc (compositor), i used *LOG(INFO)<<"print";* from *base/logging.h *(of main chromium *src*) On Mon, Jun 18, 2018 at 5:12 PM Jakob Kummerow wrote: > Yes, it is. > > Have you tried using a debugger? You can set a breakpoint in > the BUILTIN(DateNow) function here: > > > https://cs.chromium.org/chromium/src/v8/src/builtins/builtins-date.cc?q=builtins-date.cc=package:chromium=282 > > and step through the code from there. > > On Mon, Jun 18, 2018 at 2:39 PM Abhishek Kanike < > kai.dranzer32...@gmail.com> wrote: > >> Hi, >> For confirmation i am using a simple Date.now() call on button click >> [Attached]. >> I have added a print log in Time::NOW() at >> https://cs.chromium.org/chromium/src/v8/src/base/platform/time.cc?type=cs=package:chromium=0=402 >> as printf("v8:DEBUG::TIME:NOW called"). >> I am not getting this log in adb logcat. So is this the correct place >> from where Date.now() is getting called? >> >> Regards, >> K Abhishek >> >> On Mon, May 21, 2018 at 6:51 PM Abhishek Kanike < >> kai.dranzer32...@gmail.com> wrote: >> >>> Sorry JaKob >>> >>> On Mon, May 21, 2018, 6:51 PM Abhishek Kanike < >>> kai.dranzer32...@gmail.com> wrote: >>> Cool.. I see it. Thanks a lot Jacob. On Mon, May 21, 2018, 5:40 PM Jakob Kummerow < jkumme...@chromium.org> wrote: > The time always has to be retrieved from the kernel. V8's > implementation is in base::OS::TimeCurrentMillis, implemented in > src/base/platform/platform-{win32,posix}.cc. > > On Mon, May 21, 2018 at 3:22 PM Abhishek Kanike < > kai.dranzer32...@gmail.com> wrote: > >> Hi, >> I want to know how the date.now() function is called in >> javascript (or how it returns the value). I believe that javascript >> uses >> date.now() by system call. I want to in chrome source code how it is >> being >> set. >> This is useful for one of the performance benchmark that I am >> working on. >> Can someone please guide me to know how this happens in v8 engine. >> >> Thanks in advance. >> >> Regards, >> K Abhishek >> >> -- >> -- >> v8-users mailing list >> v8-users@googlegroups.com >> http://groups.google.com/group/v8-users >> --- >> You received this message because you are subscribed to the >> Google Groups
Re: [v8-users] How Date.now() function value is returned (Is it from kernel of v8 engine has its own implementation)
gin provides its own v8::Platform implementation, overriding the default platform. On Thu, Jun 21, 2018 at 9:55 AM Abhishek Kanike wrote: > Hi Jakob and v8-users, > I have following observations on printing logs in v8 and date.now call > trace. > >1. *Logs in v8:* > >*printf* and *std::cout* were not outputting any logs in adb logcat. I >tried redirecting stdio logs to logcat by following commands - > >$ adb shell stop$ adb shell setprop log.redirect-stdio true$ adb shell > start > >But still logs were not getting displayed in adb logcat. So I used >android log library. Following is the procedure > >- Import header file: > > #if defined(V8_OS_ANDROID) > #include > #endif > > - Print log: > > #if defined(V8_OS_ANDROID) > __android_log_print(ANDROID_LOG_INFO, "", ""); > #endif > > >2. Date.now() final system call: >Date.now() calls *V8Platform::CurrentClockTimeMillis()* from* >src/gin/v8_platform.cc *---> *Time::Now() *from *src/base/time/time.cc* >---> *getTimeofDay() *rather than *base::OS::TimeCurrentMillis. *Can >anyone explain this behaviour? > > Regards, > K Abhishek > > > > On Mon, Jun 18, 2018 at 7:07 PM Jakob Kummerow > wrote: > >> Sure, just use printf or std::cout << "print\n". I don't know whether >> adb logcat has any special requirements. >> >> On Mon, Jun 18, 2018 at 3:48 PM Abhishek Kanike < >> kai.dranzer32...@gmail.com> wrote: >> >>> Jakob, >>> Thanks for quick reply. >>> That's a good point, should have tried with gdb. Will check with that. >>> Is there a way to add logs in v8 source code, it will be lot faster to >>> debug. >>> In cc (compositor), i used *LOG(INFO)<<"print";* from *base/logging.h *(of >>> main chromium *src*) >>> >>> On Mon, Jun 18, 2018 at 5:12 PM Jakob Kummerow >>> wrote: >>> Yes, it is. Have you tried using a debugger? You can set a breakpoint in the BUILTIN(DateNow) function here: https://cs.chromium.org/chromium/src/v8/src/builtins/builtins-date.cc?q=builtins-date.cc=package:chromium=282 and step through the code from there. On Mon, Jun 18, 2018 at 2:39 PM Abhishek Kanike < kai.dranzer32...@gmail.com> wrote: > Hi, > For confirmation i am using a simple Date.now() call on button click > [Attached]. > I have added a print log in Time::NOW() at > https://cs.chromium.org/chromium/src/v8/src/base/platform/time.cc?type=cs=package:chromium=0=402 > as printf("v8:DEBUG::TIME:NOW called"). > I am not getting this log in adb logcat. So is this the correct place > from where Date.now() is getting called? > > Regards, > K Abhishek > > On Mon, May 21, 2018 at 6:51 PM Abhishek Kanike < > kai.dranzer32...@gmail.com> wrote: > >> Sorry JaKob >> >> On Mon, May 21, 2018, 6:51 PM Abhishek Kanike < >> kai.dranzer32...@gmail.com> wrote: >> >>> Cool.. I see it. Thanks a lot Jacob. >>> >>> On Mon, May 21, 2018, 5:40 PM Jakob Kummerow >>> wrote: >>> The time always has to be retrieved from the kernel. V8's implementation is in base::OS::TimeCurrentMillis, implemented in src/base/platform/platform-{win32,posix}.cc. On Mon, May 21, 2018 at 3:22 PM Abhishek Kanike < kai.dranzer32...@gmail.com> wrote: > Hi, > I want to know how the date.now() function is called in javascript > (or how it returns the value). I believe that javascript uses > date.now() by > system call. I want to in chrome source code how it is being set. > This is useful for one of the performance benchmark that I am > working on. > Can someone please guide me to know how this happens in v8 engine. > > Thanks in advance. > > Regards, > K Abhishek > > -- > -- > v8-users mailing list > v8-users@googlegroups.com > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google > Groups "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, > send an email to v8-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. >>> > > -- > Cheers, > K Abhishek > > -- > -- >
Re: [v8-users] How Date.now() function value is returned (Is it from kernel of v8 engine has its own implementation)
Hi Jakob and v8-users, I have following observations on printing logs in v8 and date.now call trace. 1. *Logs in v8:* *printf* and *std::cout* were not outputting any logs in adb logcat. I tried redirecting stdio logs to logcat by following commands - $ adb shell stop$ adb shell setprop log.redirect-stdio true$ adb shell start But still logs were not getting displayed in adb logcat. So I used android log library. Following is the procedure - Import header file: #if defined(V8_OS_ANDROID) #include #endif - Print log: #if defined(V8_OS_ANDROID) __android_log_print(ANDROID_LOG_INFO, "", ""); #endif 2. Date.now() final system call: Date.now() calls *V8Platform::CurrentClockTimeMillis()* from* src/gin/v8_platform.cc *---> *Time::Now() *from *src/base/time/time.cc* ---> *getTimeofDay() *rather than *base::OS::TimeCurrentMillis. *Can anyone explain this behaviour? Regards, K Abhishek On Mon, Jun 18, 2018 at 7:07 PM Jakob Kummerow wrote: > Sure, just use printf or std::cout << "print\n". I don't know whether adb > logcat has any special requirements. > > On Mon, Jun 18, 2018 at 3:48 PM Abhishek Kanike < > kai.dranzer32...@gmail.com> wrote: > >> Jakob, >> Thanks for quick reply. >> That's a good point, should have tried with gdb. Will check with that. >> Is there a way to add logs in v8 source code, it will be lot faster to >> debug. >> In cc (compositor), i used *LOG(INFO)<<"print";* from *base/logging.h *(of >> main chromium *src*) >> >> On Mon, Jun 18, 2018 at 5:12 PM Jakob Kummerow >> wrote: >> >>> Yes, it is. >>> >>> Have you tried using a debugger? You can set a breakpoint in >>> the BUILTIN(DateNow) function here: >>> >>> >>> https://cs.chromium.org/chromium/src/v8/src/builtins/builtins-date.cc?q=builtins-date.cc=package:chromium=282 >>> >>> and step through the code from there. >>> >>> On Mon, Jun 18, 2018 at 2:39 PM Abhishek Kanike < >>> kai.dranzer32...@gmail.com> wrote: >>> Hi, For confirmation i am using a simple Date.now() call on button click [Attached]. I have added a print log in Time::NOW() at https://cs.chromium.org/chromium/src/v8/src/base/platform/time.cc?type=cs=package:chromium=0=402 as printf("v8:DEBUG::TIME:NOW called"). I am not getting this log in adb logcat. So is this the correct place from where Date.now() is getting called? Regards, K Abhishek On Mon, May 21, 2018 at 6:51 PM Abhishek Kanike < kai.dranzer32...@gmail.com> wrote: > Sorry JaKob > > On Mon, May 21, 2018, 6:51 PM Abhishek Kanike < > kai.dranzer32...@gmail.com> wrote: > >> Cool.. I see it. Thanks a lot Jacob. >> >> On Mon, May 21, 2018, 5:40 PM Jakob Kummerow >> wrote: >> >>> The time always has to be retrieved from the kernel. V8's >>> implementation is in base::OS::TimeCurrentMillis, implemented in >>> src/base/platform/platform-{win32,posix}.cc. >>> >>> On Mon, May 21, 2018 at 3:22 PM Abhishek Kanike < >>> kai.dranzer32...@gmail.com> wrote: >>> Hi, I want to know how the date.now() function is called in javascript (or how it returns the value). I believe that javascript uses date.now() by system call. I want to in chrome source code how it is being set. This is useful for one of the performance benchmark that I am working on. Can someone please guide me to know how this happens in v8 engine. Thanks in advance. Regards, K Abhishek -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. >>> -- >>> -- >>> v8-users mailing list >>> v8-users@googlegroups.com >>> http://groups.google.com/group/v8-users >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "v8-users" group. >>> To unsubscribe from this group and stop receiving emails from it, >>> send an email to v8-users+unsubscr...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- Cheers, K Abhishek -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to
Re: [v8-users] How Date.now() function value is returned (Is it from kernel of v8 engine has its own implementation)
Sure, just use printf or std::cout << "print\n". I don't know whether adb logcat has any special requirements. On Mon, Jun 18, 2018 at 3:48 PM Abhishek Kanike wrote: > Jakob, > Thanks for quick reply. > That's a good point, should have tried with gdb. Will check with that. > Is there a way to add logs in v8 source code, it will be lot faster to > debug. > In cc (compositor), i used *LOG(INFO)<<"print";* from *base/logging.h *(of > main chromium *src*) > > On Mon, Jun 18, 2018 at 5:12 PM Jakob Kummerow > wrote: > >> Yes, it is. >> >> Have you tried using a debugger? You can set a breakpoint in >> the BUILTIN(DateNow) function here: >> >> >> https://cs.chromium.org/chromium/src/v8/src/builtins/builtins-date.cc?q=builtins-date.cc=package:chromium=282 >> >> and step through the code from there. >> >> On Mon, Jun 18, 2018 at 2:39 PM Abhishek Kanike < >> kai.dranzer32...@gmail.com> wrote: >> >>> Hi, >>> For confirmation i am using a simple Date.now() call on button click >>> [Attached]. >>> I have added a print log in Time::NOW() at >>> https://cs.chromium.org/chromium/src/v8/src/base/platform/time.cc?type=cs=package:chromium=0=402 >>> as printf("v8:DEBUG::TIME:NOW called"). >>> I am not getting this log in adb logcat. So is this the correct place >>> from where Date.now() is getting called? >>> >>> Regards, >>> K Abhishek >>> >>> On Mon, May 21, 2018 at 6:51 PM Abhishek Kanike < >>> kai.dranzer32...@gmail.com> wrote: >>> Sorry JaKob On Mon, May 21, 2018, 6:51 PM Abhishek Kanike < kai.dranzer32...@gmail.com> wrote: > Cool.. I see it. Thanks a lot Jacob. > > On Mon, May 21, 2018, 5:40 PM Jakob Kummerow > wrote: > >> The time always has to be retrieved from the kernel. V8's >> implementation is in base::OS::TimeCurrentMillis, implemented in >> src/base/platform/platform-{win32,posix}.cc. >> >> On Mon, May 21, 2018 at 3:22 PM Abhishek Kanike < >> kai.dranzer32...@gmail.com> wrote: >> >>> Hi, >>> I want to know how the date.now() function is called in javascript >>> (or how it returns the value). I believe that javascript uses >>> date.now() by >>> system call. I want to in chrome source code how it is being set. >>> This is useful for one of the performance benchmark that I am >>> working on. >>> Can someone please guide me to know how this happens in v8 engine. >>> >>> Thanks in advance. >>> >>> Regards, >>> K Abhishek >>> >>> -- >>> -- >>> v8-users mailing list >>> v8-users@googlegroups.com >>> http://groups.google.com/group/v8-users >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "v8-users" group. >>> To unsubscribe from this group and stop receiving emails from it, >>> send an email to v8-users+unsubscr...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> -- >> v8-users mailing list >> v8-users@googlegroups.com >> http://groups.google.com/group/v8-users >> --- >> You received this message because you are subscribed to the Google >> Groups "v8-users" group. >> To unsubscribe from this group and stop receiving emails from it, >> send an email to v8-users+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > >>> >>> -- >>> Cheers, >>> K Abhishek >>> >>> -- >>> -- >>> v8-users mailing list >>> v8-users@googlegroups.com >>> http://groups.google.com/group/v8-users >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "v8-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to v8-users+unsubscr...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> -- >> v8-users mailing list >> v8-users@googlegroups.com >> http://groups.google.com/group/v8-users >> --- >> You received this message because you are subscribed to the Google Groups >> "v8-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to v8-users+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > > -- > Cheers, > K Abhishek > > -- > -- > v8-users mailing list > v8-users@googlegroups.com > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google Groups > "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to v8-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email
Re: [v8-users] How Date.now() function value is returned (Is it from kernel of v8 engine has its own implementation)
Jakob, Thanks for quick reply. That's a good point, should have tried with gdb. Will check with that. Is there a way to add logs in v8 source code, it will be lot faster to debug. In cc (compositor), i used *LOG(INFO)<<"print";* from *base/logging.h *(of main chromium *src*) On Mon, Jun 18, 2018 at 5:12 PM Jakob Kummerow wrote: > Yes, it is. > > Have you tried using a debugger? You can set a breakpoint in > the BUILTIN(DateNow) function here: > > > https://cs.chromium.org/chromium/src/v8/src/builtins/builtins-date.cc?q=builtins-date.cc=package:chromium=282 > > and step through the code from there. > > On Mon, Jun 18, 2018 at 2:39 PM Abhishek Kanike < > kai.dranzer32...@gmail.com> wrote: > >> Hi, >> For confirmation i am using a simple Date.now() call on button click >> [Attached]. >> I have added a print log in Time::NOW() at >> https://cs.chromium.org/chromium/src/v8/src/base/platform/time.cc?type=cs=package:chromium=0=402 >> as printf("v8:DEBUG::TIME:NOW called"). >> I am not getting this log in adb logcat. So is this the correct place >> from where Date.now() is getting called? >> >> Regards, >> K Abhishek >> >> On Mon, May 21, 2018 at 6:51 PM Abhishek Kanike < >> kai.dranzer32...@gmail.com> wrote: >> >>> Sorry JaKob >>> >>> On Mon, May 21, 2018, 6:51 PM Abhishek Kanike < >>> kai.dranzer32...@gmail.com> wrote: >>> Cool.. I see it. Thanks a lot Jacob. On Mon, May 21, 2018, 5:40 PM Jakob Kummerow wrote: > The time always has to be retrieved from the kernel. V8's > implementation is in base::OS::TimeCurrentMillis, implemented in > src/base/platform/platform-{win32,posix}.cc. > > On Mon, May 21, 2018 at 3:22 PM Abhishek Kanike < > kai.dranzer32...@gmail.com> wrote: > >> Hi, >> I want to know how the date.now() function is called in javascript >> (or how it returns the value). I believe that javascript uses date.now() >> by >> system call. I want to in chrome source code how it is being set. >> This is useful for one of the performance benchmark that I am working >> on. >> Can someone please guide me to know how this happens in v8 engine. >> >> Thanks in advance. >> >> Regards, >> K Abhishek >> >> -- >> -- >> v8-users mailing list >> v8-users@googlegroups.com >> http://groups.google.com/group/v8-users >> --- >> You received this message because you are subscribed to the Google >> Groups "v8-users" group. >> To unsubscribe from this group and stop receiving emails from it, >> send an email to v8-users+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > -- > -- > v8-users mailing list > v8-users@googlegroups.com > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google > Groups "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to v8-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > >> >> -- >> Cheers, >> K Abhishek >> >> -- >> -- >> v8-users mailing list >> v8-users@googlegroups.com >> http://groups.google.com/group/v8-users >> --- >> You received this message because you are subscribed to the Google Groups >> "v8-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to v8-users+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > -- > -- > v8-users mailing list > v8-users@googlegroups.com > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google Groups > "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to v8-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Cheers, K Abhishek -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [v8-users] How Date.now() function value is returned (Is it from kernel of v8 engine has its own implementation)
Yes, it is. Have you tried using a debugger? You can set a breakpoint in the BUILTIN(DateNow) function here: https://cs.chromium.org/chromium/src/v8/src/builtins/builtins-date.cc?q=builtins-date.cc=package:chromium=282 and step through the code from there. On Mon, Jun 18, 2018 at 2:39 PM Abhishek Kanike wrote: > Hi, > For confirmation i am using a simple Date.now() call on button click > [Attached]. > I have added a print log in Time::NOW() at > https://cs.chromium.org/chromium/src/v8/src/base/platform/time.cc?type=cs=package:chromium=0=402 > as printf("v8:DEBUG::TIME:NOW called"). > I am not getting this log in adb logcat. So is this the correct place from > where Date.now() is getting called? > > Regards, > K Abhishek > > On Mon, May 21, 2018 at 6:51 PM Abhishek Kanike < > kai.dranzer32...@gmail.com> wrote: > >> Sorry JaKob >> >> On Mon, May 21, 2018, 6:51 PM Abhishek Kanike >> wrote: >> >>> Cool.. I see it. Thanks a lot Jacob. >>> >>> On Mon, May 21, 2018, 5:40 PM Jakob Kummerow >>> wrote: >>> The time always has to be retrieved from the kernel. V8's implementation is in base::OS::TimeCurrentMillis, implemented in src/base/platform/platform-{win32,posix}.cc. On Mon, May 21, 2018 at 3:22 PM Abhishek Kanike < kai.dranzer32...@gmail.com> wrote: > Hi, > I want to know how the date.now() function is called in javascript (or > how it returns the value). I believe that javascript uses date.now() by > system call. I want to in chrome source code how it is being set. > This is useful for one of the performance benchmark that I am working > on. > Can someone please guide me to know how this happens in v8 engine. > > Thanks in advance. > > Regards, > K Abhishek > > -- > -- > v8-users mailing list > v8-users@googlegroups.com > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google > Groups "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to v8-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. >>> > > -- > Cheers, > K Abhishek > > -- > -- > v8-users mailing list > v8-users@googlegroups.com > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google Groups > "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to v8-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [v8-users] How Date.now() function value is returned (Is it from kernel of v8 engine has its own implementation)
Sorry JaKob On Mon, May 21, 2018, 6:51 PM Abhishek Kanikewrote: > Cool.. I see it. Thanks a lot Jacob. > > On Mon, May 21, 2018, 5:40 PM Jakob Kummerow > wrote: > >> The time always has to be retrieved from the kernel. V8's implementation >> is in base::OS::TimeCurrentMillis, implemented in >> src/base/platform/platform-{win32,posix}.cc. >> >> On Mon, May 21, 2018 at 3:22 PM Abhishek Kanike < >> kai.dranzer32...@gmail.com> wrote: >> >>> Hi, >>> I want to know how the date.now() function is called in javascript (or >>> how it returns the value). I believe that javascript uses date.now() by >>> system call. I want to in chrome source code how it is being set. >>> This is useful for one of the performance benchmark that I am working on. >>> Can someone please guide me to know how this happens in v8 engine. >>> >>> Thanks in advance. >>> >>> Regards, >>> K Abhishek >>> >>> -- >>> -- >>> v8-users mailing list >>> v8-users@googlegroups.com >>> http://groups.google.com/group/v8-users >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "v8-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to v8-users+unsubscr...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> -- >> v8-users mailing list >> v8-users@googlegroups.com >> http://groups.google.com/group/v8-users >> --- >> You received this message because you are subscribed to the Google Groups >> "v8-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to v8-users+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [v8-users] How Date.now() function value is returned (Is it from kernel of v8 engine has its own implementation)
Cool.. I see it. Thanks a lot Jacob. On Mon, May 21, 2018, 5:40 PM Jakob Kummerowwrote: > The time always has to be retrieved from the kernel. V8's implementation > is in base::OS::TimeCurrentMillis, implemented in > src/base/platform/platform-{win32,posix}.cc. > > On Mon, May 21, 2018 at 3:22 PM Abhishek Kanike < > kai.dranzer32...@gmail.com> wrote: > >> Hi, >> I want to know how the date.now() function is called in javascript (or >> how it returns the value). I believe that javascript uses date.now() by >> system call. I want to in chrome source code how it is being set. >> This is useful for one of the performance benchmark that I am working on. >> Can someone please guide me to know how this happens in v8 engine. >> >> Thanks in advance. >> >> Regards, >> K Abhishek >> >> -- >> -- >> v8-users mailing list >> v8-users@googlegroups.com >> http://groups.google.com/group/v8-users >> --- >> You received this message because you are subscribed to the Google Groups >> "v8-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to v8-users+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > -- > -- > v8-users mailing list > v8-users@googlegroups.com > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google Groups > "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to v8-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [v8-users] How Date.now() function value is returned (Is it from kernel of v8 engine has its own implementation)
The time always has to be retrieved from the kernel. V8's implementation is in base::OS::TimeCurrentMillis, implemented in src/base/platform/platform-{win32,posix}.cc. On Mon, May 21, 2018 at 3:22 PM Abhishek Kanikewrote: > Hi, > I want to know how the date.now() function is called in javascript (or how > it returns the value). I believe that javascript uses date.now() by system > call. I want to in chrome source code how it is being set. > This is useful for one of the performance benchmark that I am working on. > Can someone please guide me to know how this happens in v8 engine. > > Thanks in advance. > > Regards, > K Abhishek > > -- > -- > v8-users mailing list > v8-users@googlegroups.com > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google Groups > "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to v8-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[v8-users] How Date.now() function value is returned (Is it from kernel of v8 engine has its own implementation)
Hi, I want to know how the date.now() function is called in javascript (or how it returns the value). I believe that javascript uses date.now() by system call. I want to in chrome source code how it is being set. This is useful for one of the performance benchmark that I am working on. Can someone please guide me to know how this happens in v8 engine. Thanks in advance. Regards, K Abhishek -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.