Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common: new timekeeping common code, and Objecter conversion #5782

Merged
merged 6 commits into from Dec 19, 2015

Conversation

adamemerson
Copy link
Contributor

This branch is part of the modernization process helping to support later work. It adds support for the C++11 time (std::chrono) support and as an example changes one subsystem (in this case, OSDC) to use it as an example.

@ghost ghost added feature core labels Sep 3, 2015
@adamemerson adamemerson force-pushed the wip-cxx11time branch 3 times, most recently from 504885f to cc75b69 Compare September 10, 2015 21:47
@tchaikov
Copy link
Contributor

@adamemerson could you remove the unrelated commits from your pull request? and you might want to add the "Signed-off-by" line for all your commts per https://github.com/ceph/ceph/blob/master/SubmittingPatches#L62 .

@adamemerson
Copy link
Contributor Author

Sorry, I forgot to sign off on the top one. There aren't really any unrelated commits. You need the timer and the perfcounters and so forth to get OSDC to work. And I was asked to update one subsystem as a demonstration.

@tchaikov
Copy link
Contributor

@adamcrume i meant 1d96cb3, 12e0d2b and a461a7a. they are already in master.

@adamemerson
Copy link
Contributor Author

All right, rebased on master and repushed. Github shows me six commits and they look to be the ones I want.

return time_point(seconds(ts.tv_sec) + nanoseconds(ts.tv_nsec));
}

coarse_real_clock::time_point coarse_real_clock::now(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The coarse stuff seems to be unused?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is correct. It's currently unused. I added it because there was some thought it might be useful at some point. If, for example, we were logging elapsed time rather than basing logic on it and not querying a time for any other reason, a clock that was faster but lower resolution might be nice.

@adamemerson adamemerson force-pushed the wip-cxx11time branch 2 times, most recently from 39bb5e1 to de1039c Compare October 16, 2015 19:37
@liewegas
Copy link
Member

UninitCondition
Conditional jump or move depends on uninitialised value(s)


0x4B77BD
/usr/bin/ceph-osd
ceph::timer_detail::timer<ceph::time_detail::mono_clock>::timer_thread()

/srv/autobuild-ceph/gitbuilder.git/build/out~/ceph-10.0.0-1067-g24acec2/src/./common
ceph_timer.h
112


0x6D4AA3F
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19


0x58BD181
/lib/x86_64-linux-gnu/libpthread-2.19.so
start_thread
/build/buildd/eglibc-2.19/nptl
pthread_create.c
312


0x75B347C
/lib/x86_64-linux-gnu/libc-2.19.so
clone
/build/buildd/eglibc-2.19/misc/../sysdeps/unix/sysv/linux/x86_64
clone.S
111


/a/sage-2015-12-16_21:46:23-rados-wip-sage-testing---basic-openstack/40211

@adamemerson
Copy link
Contributor Author

The newest push should fix this. We take the mutex in the constructor before starting the thread.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Since I'm making a pervasive change anyway, knock off end-of-line spaces
and wrap overly long lines.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
liewegas added a commit that referenced this pull request Dec 19, 2015
common: new timekeeping common code, and Objecter conversion

Reviewed-by: Sage Weil <sage@redhat.com>
@liewegas liewegas merged commit 64cb5f6 into master Dec 19, 2015
@liewegas liewegas deleted the wip-cxx11time branch December 19, 2015 19:00
@ghost ghost changed the title Wip cxx11time common: new timekeeping common code, and Objecter conversion Feb 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants