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

WIP | Intel Vtune tracing integration #341

Closed
wants to merge 15 commits into from
Closed

WIP | Intel Vtune tracing integration #341

wants to merge 15 commits into from

Conversation

waahm7
Copy link
Contributor

@waahm7 waahm7 commented Aug 11, 2023

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

codecov-commenter commented Aug 11, 2023

Codecov Report

Merging #341 (2883d7f) into main (195ba5a) will increase coverage by 0.01%.
Report is 3 commits behind head on main.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #341      +/-   ##
==========================================
+ Coverage   89.52%   89.53%   +0.01%     
==========================================
  Files          17       17              
  Lines        4897     4903       +6     
==========================================
+ Hits         4384     4390       +6     
  Misses        513      513              
Files Changed Coverage Δ
source/s3.c 96.29% <100.00%> (+0.14%) ⬆️
source/s3_meta_request.c 93.38% <100.00%> (+0.04%) ⬆️

@@ -5,6 +5,7 @@

#include <aws/s3/s3.h>

#include "aws/s3/private/s3_tracing.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

trivial: we usually include with brackets

Suggested change
#include "aws/s3/private/s3_tracing.h"
#include <aws/s3/private/s3_tracing.h>

* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/common/_ittnotify_private.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

make sure we end up including common/config.h before the ittnotify.h

we could do this:

Suggested change
#include <aws/common/_ittnotify_private.h>
#include <aws/s3/s3.h>
#include <aws/common/_ittnotify_private.h>

or have a tracing file in common we include, that includes config.h before ittnotify.h

@@ -94,7 +95,7 @@ static struct aws_hash_table s_compute_platform_info_table;

static bool s_library_initialized = false;
static struct aws_allocator *s_library_allocator = NULL;

__itt_domain *s3_domain;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
__itt_domain *s3_domain;
__itt_domain *s3_domain = NULL;

@@ -1592,13 +1593,16 @@ void aws_s3_meta_request_finish_default(struct aws_s3_meta_request *meta_request
struct aws_future_bool *aws_s3_meta_request_read_body(
struct aws_s3_meta_request *meta_request,
struct aws_byte_buf *buffer) {

__itt_task_begin(s3_domain, __itt_null, __itt_null, __itt_string_handle_create("read"));
Copy link
Contributor

Choose a reason for hiding this comment

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

possibly worth the optimization?

Suggested change
__itt_task_begin(s3_domain, __itt_null, __itt_null, __itt_string_handle_create("read"));
static __itt_string_handle *itt_name = __itt_string_handle_create("read");
__itt_task_begin(s3_domain, __itt_null, __itt_null, itt_name);

return aws_async_input_stream_read_to_fill(meta_request->request_body_async_stream, buffer);
struct aws_future_bool *result =
aws_async_input_stream_read_to_fill(meta_request->request_body_async_stream, buffer);
__itt_task_end(s3_domain);
Copy link
Contributor

Choose a reason for hiding this comment

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

we should probably mark up the implementation of aws_input_stream_read(), begin/end task right around the vtable call

it wil be a lot harder to mark up the async stream :|

@waahm7 waahm7 closed this Aug 23, 2023
@waahm7 waahm7 deleted the tracing branch August 23, 2023 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants