Skip to content

Speeding up gcov collection from test device #199

Answered by xaizek
joefradley asked this question in Q&A
Discussion options

You must be logged in to vote

I think you've missed that pseudo-files backed by seq_file have zero size. tar simply believes result of stat.st_size and probably doesn't even open those files. It also does use read() through safe_read() wrapper from gnulib (an alternative is to use mmap(), but I think it won't work for seq_file).

cat works because it's dump. It can just call read() until EOF. Anything that does the same should do. You might have to check coreutils/busybox/etc. for anything more than that which could lead to incomplete files (re-reading parts of a file? not sure what can be the cause here, but maybe look at handling of sparse files).

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@joefradley
Comment options

@xaizek
Comment options

@joefradley
Comment options

Answer selected by joefradley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants