[ 
https://issues.apache.org/jira/browse/TS-1775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15182256#comment-15182256
 ] 

ASF GitHub Bot commented on TS-1775:
------------------------------------

GitHub user SolidWallOfCode opened a pull request:

    https://github.com/apache/trafficserver/pull/515

    TS-1775: General hrtime cleanup.

    This removes as much as possible references to TS lib hr time functions and 
replaces them with calls to {{Thread}}. There are some other minor clean ups 
based on the discussion of TS-1775.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/SolidWallOfCode/trafficserver ts-1775

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/515.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #515
    
----
commit 4595ad1308b7d92c48784440b70c217384a10d46
Author: Alan M. Carroll <[email protected]>
Date:   2016-03-06T17:56:12Z

    TS-1775: General hrtime cleanup.

----


> Cleanup of ink_hrtime.{cc,h}
> ----------------------------
>
>                 Key: TS-1775
>                 URL: https://issues.apache.org/jira/browse/TS-1775
>             Project: Traffic Server
>          Issue Type: Improvement
>            Reporter: Leif Hedstrom
>            Assignee: Alan M. Carroll
>              Labels: newbie
>             Fix For: 6.2.0
>
>
> A few things comes to mind:
> 1) Why do we have a NEED_HRTIME define? It's always on as far as I can tell, 
> and I can't imagine there's a reason to not have it on (it'd completely break 
> like everything, in fact it would fail to compile since gethrtime() doesn't 
> exist?).
> 2) We should eliminate the USE_TIME_STAMP_COUNTER_HRTIME define, and the code 
> that implements our own TSC code. Modern Unix flavors implements this already 
> in various way (e.g. glibc's gettimeofday() wrapper has a TSC user space 
> implementation).
> 3) On FreeBSD, jpeach points out that CLOCK_REALTIME is probably not the 
> optimal way to use clock_gettime(). He suggest using CLOCK_REALTIME_FAST or 
> CLOCK_MONOTONIC_FAST which is similar to the optimizations done with TSC for 
> gettimeofday() on linux.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to