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

Added support for simulated/embedded gprof output #86

Merged
merged 1 commit into from
Oct 28, 2023

Conversation

DepthDeluxe
Copy link
Contributor

  • This format is seen in simulation of certain embedded systems.

  • This format does not include a time column and contains an additional measurement units column underneath (see line 89 of included example).

  • Provided example and test in tests/prof/embedded.prof.

The source used to generate this embedded.prof profiling report is included below.

#include <stdio.h>

namespace helloworld {
void hello() {
  printf("hello");
}
void world() {
  printf(" world!\n");
}
void run(int iterations) {
  if (iterations % 2 == 0) {
    hello();
  } else {
    world();
  }
}
} // namespace helloworld

int main(int argc, char* arvg[]) {
  for (int i = 0; i < 100*1000; ++i) {
    helloworld::run(i);
  }
}

* This format is seen in simulation of certain embedded
  systems.

* This format does not include a `time` column and contains
  an additional measurement units column underneath (see line
  89 of included example). The units of measurement row
  appears to be ignored without adding any additional ignore
  cases.

* Provided example and test in `tests/prof/embedded.prof`.
@codecov
Copy link

codecov bot commented Oct 28, 2023

Codecov Report

Merging #86 (bcb1b85) into master (cdeea9e) will increase coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master      #86      +/-   ##
==========================================
+ Coverage   86.98%   87.03%   +0.04%     
==========================================
  Files           1        1              
  Lines        2229     2229              
==========================================
+ Hits         1939     1940       +1     
+ Misses        290      289       -1     
Files Coverage Δ
gprof2dot.py 87.03% <ø> (+0.04%) ⬆️

@jrfonseca jrfonseca merged commit 2791dcc into jrfonseca:master Oct 28, 2023
4 checks passed
@jrfonseca
Copy link
Owner

Looks great. Thank you.

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.

2 participants